1 | /******************************************************************** |
2 | KWin - the KDE window manager |
3 | This file is part of the KDE project. |
4 | |
5 | Copyright (C) 2006 Lubos Lunak <l.lunak@kde.org> |
6 | |
7 | This program is free software; you can redistribute it and/or modify |
8 | it under the terms of the GNU General Public License as published by |
9 | the Free Software Foundation; either version 2 of the License, or |
10 | (at your option) any later version. |
11 | |
12 | This program is distributed in the hope that it will be useful, |
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | GNU General Public License for more details. |
16 | |
17 | You should have received a copy of the GNU General Public License |
18 | along 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 | |
28 | namespace KWin |
29 | { |
30 | |
31 | class Unmanaged |
32 | : public Toplevel |
33 | { |
34 | Q_OBJECT |
35 | public: |
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; |
50 | protected: |
51 | virtual void debug(QDebug& stream) const; |
52 | virtual bool shouldUnredirect() const; |
53 | private: |
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 | |