Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qxcbsessionmanager.cpp File Reference

(02de77535f2a94cbeb7e0ea01895ba4e556e165c)

#include "qxcbsessionmanager.h"
#include <QtCore/qvarlengtharray.h>
#include <qpa/qwindowsysteminterface.h>
#include <qguiapplication.h>
#include <qdatetime.h>
#include <qfileinfo.h>
#include <qplatformdefs.h>
#include <qsocketnotifier.h>
#include <X11/SM/SMlib.h>
#include <errno.h>
#include <cerrno>
#include "qxcbsessionmanager.moc"
Include dependency graph for qxcbsessionmanager.cpp:

Go to the source code of this file.

Classes

class  QSmSocketReceiver
struct  QT_smcConn

Functions

static void resetSmState ()
static void sm_setProperty (const char *name, const char *type, int num_vals, SmPropValue *vals)
static void sm_saveYourselfCallback (SmcConn smcConn, SmPointer clientData, int saveType, Bool shutdown, int interactStyle, Bool fast)
static void sm_saveYourselfPhase2Callback (SmcConn smcConn, SmPointer clientData)
static void sm_dieCallback (SmcConn smcConn, SmPointer clientData)
static void sm_shutdownCancelledCallback (SmcConn smcConn, SmPointer clientData)
static void sm_saveCompleteCallback (SmcConn smcConn, SmPointer clientData)
static void sm_interactCallback (SmcConn smcConn, SmPointer clientData)
static void sm_performSaveYourself (QXcbSessionManager *)
static void sm_setProperty (const QString &name, const QString &value)
static void sm_setProperty (const QString &name, const QStringList &value)

Variables

static SmcConn smcConnection = nullptr
static bool sm_interactionActive
static bool sm_smActive
static int sm_interactStyle
static int sm_saveType
static bool sm_cancel
static bool sm_waitingForInteraction
static bool sm_isshutdown
static bool sm_phase2
static bool sm_in_phase2
bool qt_sm_blockUserInput = false
static QSmSocketReceiversm_receiver = nullptr

Function Documentation

◆ resetSmState()

void resetSmState ( )
static

Definition at line 66 of file qxcbsessionmanager.cpp.

References qt_sm_blockUserInput, sm_in_phase2, sm_interactionActive, sm_interactStyle, sm_isshutdown, sm_phase2, sm_smActive, and sm_waitingForInteraction.

Referenced by QXcbSessionManager::QXcbSessionManager(), sm_dieCallback(), sm_saveCompleteCallback(), sm_saveYourselfCallback(), and sm_shutdownCancelledCallback().

Here is the caller graph for this function:

◆ sm_dieCallback()

void sm_dieCallback ( SmcConn smcConn,
SmPointer clientData )
static

Definition at line 256 of file qxcbsessionmanager.cpp.

References resetSmState(), and smcConnection.

Referenced by QXcbSessionManager::QXcbSessionManager().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sm_interactCallback()

void sm_interactCallback ( SmcConn smcConn,
SmPointer clientData )
static

Definition at line 280 of file qxcbsessionmanager.cpp.

References QXcbSessionManager::exitEventLoop(), sm_waitingForInteraction, and smcConnection.

Referenced by QXcbSessionManager::allowsErrorInteraction(), and QXcbSessionManager::allowsInteraction().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sm_performSaveYourself()

void sm_performSaveYourself ( QXcbSessionManager * sm)
static

Definition at line 155 of file qxcbsessionmanager.cpp.

References QXcbSessionManager::allowsErrorInteraction(), qt_sm_blockUserInput, sm_cancel, sm_in_phase2, sm_interactionActive, sm_isshutdown, sm_phase2, sm_saveType, sm_saveYourselfPhase2Callback(), sm_setProperty(), and smcConnection.

Referenced by sm_saveYourselfCallback(), and sm_saveYourselfPhase2Callback().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sm_saveCompleteCallback()

void sm_saveCompleteCallback ( SmcConn smcConn,
SmPointer clientData )
static

Definition at line 273 of file qxcbsessionmanager.cpp.

References resetSmState(), and smcConnection.

Referenced by QXcbSessionManager::QXcbSessionManager().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sm_saveYourselfCallback()

void sm_saveYourselfCallback ( SmcConn smcConn,
SmPointer clientData,
int saveType,
Bool shutdown,
int interactStyle,
Bool fast )
static

Definition at line 133 of file qxcbsessionmanager.cpp.

References resetSmState(), QT_smcConn::save_yourself_in_progress, QT_smcConn::shutdown_in_progress, sm_cancel, sm_interactStyle, sm_isshutdown, sm_performSaveYourself(), sm_saveType, sm_smActive, and smcConnection.

Referenced by QXcbSessionManager::QXcbSessionManager().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sm_saveYourselfPhase2Callback()

void sm_saveYourselfPhase2Callback ( SmcConn smcConn,
SmPointer clientData )
static

Definition at line 288 of file qxcbsessionmanager.cpp.

References sm_in_phase2, sm_performSaveYourself(), and smcConnection.

Referenced by sm_performSaveYourself().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sm_setProperty() [1/3]

void sm_setProperty ( const char * name,
const char * type,
int num_vals,
SmPropValue * vals )
static

Definition at line 81 of file qxcbsessionmanager.cpp.

References smcConnection.

Referenced by sm_performSaveYourself().

Here is the caller graph for this function:

◆ sm_setProperty() [2/3]

void sm_setProperty ( const QString & name,
const QString & value )
static

Definition at line 101 of file qxcbsessionmanager.cpp.

◆ sm_setProperty() [3/3]

void sm_setProperty ( const QString & name,
const QStringList & value )
static

Definition at line 110 of file qxcbsessionmanager.cpp.

◆ sm_shutdownCancelledCallback()

void sm_shutdownCancelledCallback ( SmcConn smcConn,
SmPointer clientData )
static

Definition at line 264 of file qxcbsessionmanager.cpp.

References QXcbSessionManager::exitEventLoop(), resetSmState(), sm_waitingForInteraction, and smcConnection.

Referenced by QXcbSessionManager::QXcbSessionManager().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ qt_sm_blockUserInput

◆ sm_cancel

bool sm_cancel
static

◆ sm_in_phase2

bool sm_in_phase2
static

◆ sm_interactionActive

◆ sm_interactStyle

◆ sm_isshutdown

bool sm_isshutdown
static

◆ sm_phase2

bool sm_phase2
static

◆ sm_receiver

QSmSocketReceiver * sm_receiver = nullptr
static

Definition at line 52 of file qxcbsessionmanager.cpp.

Referenced by QXcbSessionManager::~QXcbSessionManager().

◆ sm_saveType

int sm_saveType
static

Definition at line 44 of file qxcbsessionmanager.cpp.

Referenced by sm_performSaveYourself(), and sm_saveYourselfCallback().

◆ sm_smActive

◆ sm_waitingForInteraction

◆ smcConnection