1 /********************************************************************
2 KWin - the KDE window manager
3 This file is part of the KDE project.
5 Copyright (C) 1999, 2000 Matthias Ettrich <ettrich@kde.org>
6 Copyright (C) 2003 Lubos Lunak <l.lunak@kde.org>
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>.
20 *********************************************************************/
25 #include <QDataStream>
26 #include <kapplication.h>
27 #include <ksessionmanager.h>
28 #include <X11/SM/SMlib.h>
29 #include <netwm_def.h>
32 class QSocketNotifier
;
40 QByteArray windowRole
;
42 QByteArray wmClientMachine
;
43 QByteArray resourceName
;
44 QByteArray resourceClass
;
60 NET::WindowType windowType
;
62 bool active
; // means 'was active in the saved session'
69 SMSavePhase0
, // saving global state in "phase 0"
70 SMSavePhase2
, // saving window state in phase 2
71 SMSavePhase2Full
// complete saving in phase2, there was no phase 0
74 class SessionSaveDoneHelper
79 SessionSaveDoneHelper();
80 virtual ~SessionSaveDoneHelper();
81 SmcConn
connection() const { return conn
; }
87 QSocketNotifier
* notifier
;
93 : public KSessionManager
96 virtual bool saveState( QSessionManager
& sm
);
97 virtual bool commitData( QSessionManager
& sm
);