Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qxcbsessionmanager.cpp File Reference

(1c6bf3e09ea9722717caedcfcceaaf3d607615cf)

#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()

static void sm_performSaveYourself ( QXcbSessionManager * sm)
static

Definition at line 154 of file qxcbsessionmanager.cpp.

References QCoreApplication::applicationFilePath(), QCoreApplication::arguments(), arguments, QList< T >::at(), Qt::CaseInsensitive, compare(), QString::fromLatin1(), QString::fromLocal8Bit(), QList< T >::isEmpty(), QString::number(), Q_FALLTHROUGH, qAppName(), qt_sm_blockUserInput, sm_cancel, sm_in_phase2, sm_interactionActive, sm_isshutdown, sm_phase2, sm_saveType, sm_saveYourselfPhase2Callback(), sm_setProperty(), smcConnection, and True.

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()

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 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 QSet< T >::begin(), QSet< T >::end(), it, 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