Changeset View
Changeset View
Standalone View
Standalone View
unmanaged.cpp
Show All 22 Lines | |||||
23 | #include "workspace.h" | 23 | #include "workspace.h" | ||
24 | #include "effects.h" | 24 | #include "effects.h" | ||
25 | #include "deleted.h" | 25 | #include "deleted.h" | ||
26 | #include "utils.h" | 26 | #include "utils.h" | ||
27 | #include "xcbutils.h" | 27 | #include "xcbutils.h" | ||
28 | 28 | | |||
29 | #include <QTimer> | 29 | #include <QTimer> | ||
30 | #include <QDebug> | 30 | #include <QDebug> | ||
31 | #include <QWindow> | ||||
31 | 32 | | |||
32 | #include <xcb/shape.h> | 33 | #include <xcb/shape.h> | ||
33 | 34 | | |||
34 | namespace KWin | 35 | namespace KWin | ||
35 | { | 36 | { | ||
36 | 37 | | |||
37 | Unmanaged::Unmanaged() | 38 | Unmanaged::Unmanaged() | ||
38 | : Toplevel() | 39 | : Toplevel() | ||
Show All 37 Lines | 51 | { | |||
76 | getWmClientLeader(); | 77 | getWmClientLeader(); | ||
77 | getWmClientMachine(); | 78 | getWmClientMachine(); | ||
78 | if (Xcb::Extensions::self()->isShapeAvailable()) | 79 | if (Xcb::Extensions::self()->isShapeAvailable()) | ||
79 | xcb_shape_select_input(connection(), w, true); | 80 | xcb_shape_select_input(connection(), w, true); | ||
80 | detectShape(w); | 81 | detectShape(w); | ||
81 | getWmOpaqueRegion(); | 82 | getWmOpaqueRegion(); | ||
82 | getSkipCloseAnimation(); | 83 | getSkipCloseAnimation(); | ||
83 | setupCompositing(); | 84 | setupCompositing(); | ||
85 | if (QWindow *internalWindow = findInternalWindow()) { | ||||
86 | m_outline = internalWindow->property("__kwin_outline").toBool(); | ||||
87 | } | ||||
84 | if (effects) | 88 | if (effects) | ||
85 | static_cast<EffectsHandlerImpl*>(effects)->checkInputWindowStacking(); | 89 | static_cast<EffectsHandlerImpl*>(effects)->checkInputWindowStacking(); | ||
86 | return true; | 90 | return true; | ||
87 | } | 91 | } | ||
88 | 92 | | |||
89 | void Unmanaged::release(ReleaseReason releaseReason) | 93 | void Unmanaged::release(ReleaseReason releaseReason) | ||
90 | { | 94 | { | ||
91 | Deleted* del = NULL; | 95 | Deleted* del = NULL; | ||
▲ Show 20 Lines • Show All 62 Lines • ▼ Show 20 Line(s) | 156 | { | |||
154 | // as there are no rules to check and no hacks to apply | 158 | // as there are no rules to check and no hacks to apply | ||
155 | Q_UNUSED(direct) | 159 | Q_UNUSED(direct) | ||
156 | if (supportedTypes == 0) { | 160 | if (supportedTypes == 0) { | ||
157 | supportedTypes = SUPPORTED_UNMANAGED_WINDOW_TYPES_MASK; | 161 | supportedTypes = SUPPORTED_UNMANAGED_WINDOW_TYPES_MASK; | ||
158 | } | 162 | } | ||
159 | return info->windowType(NET::WindowTypes(supportedTypes)); | 163 | return info->windowType(NET::WindowTypes(supportedTypes)); | ||
160 | } | 164 | } | ||
161 | 165 | | |||
166 | bool Unmanaged::isOutline() const | ||||
167 | { | ||||
168 | return m_outline; | ||||
169 | } | ||||
170 | | ||||
162 | void Unmanaged::addDamage(const QRegion &damage) | 171 | void Unmanaged::addDamage(const QRegion &damage) | ||
163 | { | 172 | { | ||
164 | repaints_region += damage; | 173 | repaints_region += damage; | ||
165 | Toplevel::addDamage(damage); | 174 | Toplevel::addDamage(damage); | ||
166 | } | 175 | } | ||
167 | 176 | | |||
177 | QWindow *Unmanaged::findInternalWindow() const | ||||
178 | { | ||||
179 | const QWindowList windows = kwinApp()->topLevelWindows(); | ||||
180 | for (QWindow *w : windows) { | ||||
181 | if (w->winId() == window()) { | ||||
182 | return w; | ||||
183 | } | ||||
184 | } | ||||
185 | return nullptr; | ||||
186 | } | ||||
187 | | ||||
168 | } // namespace | 188 | } // namespace | ||
169 | 189 | |