~agateau/unity-2d/no-frame-around-disabled-menubar-items

« back to all changes in this revision

Viewing changes to libunity-2d-private/src/gnomesessionclient.cpp

  • Committer: Aurelien Gateau
  • Date: 2011-03-23 14:51:12 UTC
  • mfrom: (466.1.4 wait-for-end-session)
  • Revision ID: aurelien.gateau@canonical.com-20110323145112-3wtxbo4m11kejur3
[session] Set m_waitingForEndSession earlier to prevent app from being closed before first signal received

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
static const char* SM_CLIENT_DBUS_INTERFACE = "org.gnome.SessionManager.ClientPrivate";
40
40
 
41
41
// Number of seconds to wait for gnome-session to call us back
42
 
static const int MAX_END_SESSION_WAIT = 5;
 
42
static const int MAX_END_SESSION_WAIT = 3;
43
43
 
44
44
struct GnomeSessionClientPrivate
45
45
{
108
108
        return;
109
109
    }
110
110
 
 
111
    d->m_waitingForEndSession = true;
111
112
    QDBusConnection bus = QDBusConnection::sessionBus();
112
113
    d->m_clientPath = reply.value().path();
113
114
 
128
129
void GnomeSessionClient::queryEndSession()
129
130
{
130
131
    UQ_DEBUG;
131
 
    d->m_waitingForEndSession = true;
132
 
 
133
132
    if (!d->sendEndSessionResponse()) {
134
133
      d->m_waitingForEndSession = false;
135
134
    }