1 /*
2     KWin - the KDE window manager
3     This file is part of the KDE project.
4 
5     SPDX-FileCopyrightText: 2006 Lubos Lunak <l.lunak@kde.org>
6 
7     SPDX-License-Identifier: GPL-2.0-or-later
8 */
9 
10 #ifndef KWIN_UNMANAGED_H
11 #define KWIN_UNMANAGED_H
12 
13 #include <netwm.h>
14 
15 #include "toplevel.h"
16 
17 namespace KWin
18 {
19 
20 class KWIN_EXPORT Unmanaged : public Toplevel
21 {
22     Q_OBJECT
23 public:
24     explicit Unmanaged();
25     bool windowEvent(xcb_generic_event_t *e);
26     bool track(xcb_window_t w);
27     bool hasScheduledRelease() const;
28     static void deleteUnmanaged(Unmanaged* c);
29     int desktop() const override;
30     QStringList activities() const override;
31     QVector<VirtualDesktop *> desktops() const override;
32     QPoint clientPos() const override;
layer()33     Layer layer() const override {
34         return UnmanagedLayer;
35     }
36     NET::WindowType windowType(bool direct = false, int supported_types = 0) const override;
37     bool isOutline() const override;
38 
39 public Q_SLOTS:
40     void release(ReleaseReason releaseReason = ReleaseReason::Release);
41 
42 private:
43     ~Unmanaged() override; // use release()
44     // handlers for X11 events
45     void configureNotifyEvent(xcb_configure_notify_event_t *e);
46     void damageNotifyEvent();
47     QWindow *findInternalWindow() const;
48     void associate();
49     void initialize();
50     bool m_outline = false;
51     bool m_scheduledRelease = false;
52 };
53 
54 } // namespace
55 
56 #endif
57