1/********************************************************************
2 KWin - the KDE window manager
3 This file is part of the KDE project.
4
5Copyright (C) 2006 Lubos Lunak <l.lunak@kde.org>
6
7This program is free software; you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
9the Free Software Foundation; either version 2 of the License, or
10(at your option) any later version.
11
12This program is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with this program. If not, see <http://www.gnu.org/licenses/>.
19*********************************************************************/
20
21#ifndef KWIN_UNMANAGED_H
22#define KWIN_UNMANAGED_H
23
24#include <netwm.h>
25
26#include "toplevel.h"
27
28namespace KWin
29{
30
31class Unmanaged
32 : public Toplevel
33{
34 Q_OBJECT
35public:
36 explicit Unmanaged();
37 bool windowEvent(XEvent* e);
38 void release(bool on_shutdown = false);
39 bool track(Window w);
40 static void deleteUnmanaged(Unmanaged* c);
41 virtual int desktop() const;
42 virtual QStringList activities() const;
43 virtual QPoint clientPos() const;
44 virtual QSize clientSize() const;
45 virtual QRect transparentRect() const;
46 virtual Layer layer() const {
47 return UnmanagedLayer;
48 }
49 NET::WindowType windowType(bool direct = false, int supported_types = 0) const;
50protected:
51 virtual void debug(QDebug& stream) const;
52 virtual bool shouldUnredirect() const;
53private:
54 virtual ~Unmanaged(); // use release()
55 // handlers for X11 events
56 void mapNotifyEvent(XMapEvent* e);
57 void unmapNotifyEvent(XUnmapEvent*e);
58 void configureNotifyEvent(XConfigureEvent* e);
59};
60
61} // namespace
62
63#endif
64