Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qxcbsessionmanager.cpp File Reference
#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()

static void resetSmState ( )
static

Definition at line 65 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()

static void sm_dieCallback ( SmcConn  smcConn,
SmPointer  clientData 
)
static

Definition at line 255 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()

static void sm_interactCallback ( SmcConn  smcConn,
SmPointer  clientData 
)
static

Definition at line 279 of file qxcbsessionmanager.cpp.

References sm_waitingForInteraction, and smcConnection.

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

+ Here is the caller graph for this function:

◆ sm_performSaveYourself()

◆ sm_saveCompleteCallback()

static void sm_saveCompleteCallback ( SmcConn  smcConn,
SmPointer  clientData 
)
static

Definition at line 272 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()

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

Definition at line 132 of file qxcbsessionmanager.cpp.

References resetSmState(), 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()

static void sm_saveYourselfPhase2Callback ( SmcConn  smcConn,
SmPointer  clientData 
)
static

Definition at line 287 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]

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

Definition at line 80 of file qxcbsessionmanager.cpp.

References smcConnection.

Referenced by QXcbSessionManager::setManagerProperty(), QXcbSessionManager::setManagerProperty(), sm_performSaveYourself(), sm_setProperty(), and sm_setProperty().

+ Here is the caller graph for this function:

◆ sm_setProperty() [2/3]

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

Definition at line 100 of file qxcbsessionmanager.cpp.

References QByteArray::length(), and sm_setProperty().

+ Here is the call graph for this function:

◆ sm_setProperty() [3/3]

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

Definition at line 109 of file qxcbsessionmanager.cpp.

References QList< T >::append(), QSet< T >::begin(), QList< T >::constLast(), QSet< T >::end(), it, QList< T >::reserve(), and sm_setProperty().

+ Here is the call graph for this function:

◆ sm_shutdownCancelledCallback()

static void sm_shutdownCancelledCallback ( SmcConn  smcConn,
SmPointer  clientData 
)
static

Definition at line 263 of file qxcbsessionmanager.cpp.

References 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

◆ sm_saveType

int sm_saveType
static

Definition at line 43 of file qxcbsessionmanager.cpp.

Referenced by sm_performSaveYourself(), and sm_saveYourselfCallback().

◆ sm_smActive

◆ sm_waitingForInteraction

◆ smcConnection