Changeset View
Changeset View
Standalone View
Standalone View
client.h
Show First 20 Lines • Show All 84 Lines • ▼ Show 20 Line(s) | 64 | { | |||
---|---|---|---|---|---|
85 | * Whether the Client uses client side window decorations. | 85 | * Whether the Client uses client side window decorations. | ||
86 | * Only GTK+ are detected. | 86 | * Only GTK+ are detected. | ||
87 | **/ | 87 | **/ | ||
88 | Q_PROPERTY(bool clientSideDecorated READ isClientSideDecorated NOTIFY clientSideDecoratedChanged) | 88 | Q_PROPERTY(bool clientSideDecorated READ isClientSideDecorated NOTIFY clientSideDecoratedChanged) | ||
89 | public: | 89 | public: | ||
90 | explicit Client(); | 90 | explicit Client(); | ||
91 | xcb_window_t wrapperId() const; | 91 | xcb_window_t wrapperId() const; | ||
92 | xcb_window_t inputId() const { return m_decoInputExtent; } | 92 | xcb_window_t inputId() const { return m_decoInputExtent; } | ||
93 | virtual xcb_window_t frameId() const override; | 93 | xcb_window_t frameId() const override; | ||
94 | 94 | | |||
95 | bool isTransient() const override; | 95 | bool isTransient() const override; | ||
96 | bool groupTransient() const override; | 96 | bool groupTransient() const override; | ||
97 | bool wasOriginallyGroupTransient() const; | 97 | bool wasOriginallyGroupTransient() const; | ||
98 | QList<AbstractClient*> mainClients() const override; // Call once before loop , is not indirect | 98 | QList<AbstractClient*> mainClients() const override; // Call once before loop , is not indirect | ||
99 | bool hasTransient(const AbstractClient* c, bool indirect) const override; | 99 | bool hasTransient(const AbstractClient* c, bool indirect) const override; | ||
100 | void checkTransient(xcb_window_t w); | 100 | void checkTransient(xcb_window_t w); | ||
101 | AbstractClient* findModal(bool allow_itself = false) override; | 101 | AbstractClient* findModal(bool allow_itself = false) override; | ||
102 | const Group* group() const override; | 102 | const Group* group() const override; | ||
103 | Group* group() override; | 103 | Group* group() override; | ||
104 | void checkGroup(Group* gr = NULL, bool force = false); | 104 | void checkGroup(Group* gr = NULL, bool force = false); | ||
105 | void changeClientLeaderGroup(Group* gr); | 105 | void changeClientLeaderGroup(Group* gr); | ||
106 | void updateWindowRules(Rules::Types selection) override; | 106 | void updateWindowRules(Rules::Types selection) override; | ||
107 | void updateFullscreenMonitors(NETFullscreenMonitors topology); | 107 | void updateFullscreenMonitors(NETFullscreenMonitors topology); | ||
108 | 108 | | |||
109 | bool hasNETSupport() const; | 109 | bool hasNETSupport() const; | ||
110 | 110 | | |||
111 | QSize minSize() const override; | 111 | QSize minSize() const override; | ||
112 | QSize maxSize() const override; | 112 | QSize maxSize() const override; | ||
113 | QSize basicUnit() const; | 113 | QSize basicUnit() const; | ||
114 | virtual QSize clientSize() const; | 114 | QSize clientSize() const override; | ||
115 | QPoint inputPos() const { return input_offset; } // Inside of geometry() | 115 | QPoint inputPos() const { return input_offset; } // Inside of geometry() | ||
116 | 116 | | |||
117 | bool windowEvent(xcb_generic_event_t *e); | 117 | bool windowEvent(xcb_generic_event_t *e); | ||
118 | NET::WindowType windowType(bool direct = false, int supported_types = 0) const; | 118 | NET::WindowType windowType(bool direct = false, int supported_types = 0) const override; | ||
119 | 119 | | |||
120 | bool manage(xcb_window_t w, bool isMapped); | 120 | bool manage(xcb_window_t w, bool isMapped); | ||
121 | void releaseWindow(bool on_shutdown = false); | 121 | void releaseWindow(bool on_shutdown = false); | ||
122 | void destroyClient(); | 122 | void destroyClient(); | ||
123 | 123 | | |||
124 | virtual QStringList activities() const; | 124 | QStringList activities() const override; | ||
125 | void setOnActivity(const QString &activity, bool enable); | 125 | void setOnActivity(const QString &activity, bool enable); | ||
126 | void setOnAllActivities(bool set) override; | 126 | void setOnAllActivities(bool set) override; | ||
127 | void setOnActivities(QStringList newActivitiesList) override; | 127 | void setOnActivities(QStringList newActivitiesList) override; | ||
128 | void updateActivities(bool includeTransients); | 128 | void updateActivities(bool includeTransients); | ||
129 | void blockActivityUpdates(bool b = true) override; | 129 | void blockActivityUpdates(bool b = true) override; | ||
130 | 130 | | |||
131 | /// Is not minimized and not hidden. I.e. normally visible on some virtual desktop. | 131 | /// Is not minimized and not hidden. I.e. normally visible on some virtual desktop. | ||
132 | bool isShown(bool shaded_is_shown) const override; | 132 | bool isShown(bool shaded_is_shown) const override; | ||
▲ Show 20 Lines • Show All 65 Lines • ▼ Show 20 Line(s) | |||||
198 | xcb_colormap_t colormap() const; | 198 | xcb_colormap_t colormap() const; | ||
199 | 199 | | |||
200 | /// Updates visibility depending on being shaded, virtual desktop, etc. | 200 | /// Updates visibility depending on being shaded, virtual desktop, etc. | ||
201 | void updateVisibility(); | 201 | void updateVisibility(); | ||
202 | /// Hides a client - Basically like minimize, but without effects, it's simply hidden | 202 | /// Hides a client - Basically like minimize, but without effects, it's simply hidden | ||
203 | void hideClient(bool hide) override; | 203 | void hideClient(bool hide) override; | ||
204 | bool hiddenPreview() const; ///< Window is mapped in order to get a window pixmap | 204 | bool hiddenPreview() const; ///< Window is mapped in order to get a window pixmap | ||
205 | 205 | | |||
206 | virtual bool setupCompositing(); | 206 | bool setupCompositing() override; | ||
207 | void finishCompositing(ReleaseReason releaseReason = ReleaseReason::Release) override; | 207 | void finishCompositing(ReleaseReason releaseReason = ReleaseReason::Release) override; | ||
208 | void setBlockingCompositing(bool block); | 208 | void setBlockingCompositing(bool block); | ||
209 | inline bool isBlockingCompositing() { return blocks_compositing; } | 209 | inline bool isBlockingCompositing() { return blocks_compositing; } | ||
210 | 210 | | |||
211 | QString captionNormal() const override { | 211 | QString captionNormal() const override { | ||
212 | return cap_normal; | 212 | return cap_normal; | ||
213 | } | 213 | } | ||
214 | QString captionSuffix() const override { | 214 | QString captionSuffix() const override { | ||
▲ Show 20 Lines • Show All 43 Lines • ▼ Show 20 Line(s) | |||||
258 | 258 | | |||
259 | /** | 259 | /** | ||
260 | * Whether or not the window has a strut that expands through the invisible area of | 260 | * Whether or not the window has a strut that expands through the invisible area of | ||
261 | * an xinerama setup where the monitors are not the same resolution. | 261 | * an xinerama setup where the monitors are not the same resolution. | ||
262 | **/ | 262 | **/ | ||
263 | bool hasOffscreenXineramaStrut() const; | 263 | bool hasOffscreenXineramaStrut() const; | ||
264 | 264 | | |||
265 | // Decorations <-> Effects | 265 | // Decorations <-> Effects | ||
266 | QRect decorationRect() const; | 266 | QRect decorationRect() const override; | ||
267 | 267 | | |||
268 | QRect transparentRect() const; | 268 | QRect transparentRect() const override; | ||
269 | 269 | | |||
270 | bool isClientSideDecorated() const; | 270 | bool isClientSideDecorated() const; | ||
271 | bool wantsShadowToBeRendered() const override; | 271 | bool wantsShadowToBeRendered() const override; | ||
272 | 272 | | |||
273 | void layoutDecorationRects(QRect &left, QRect &top, QRect &right, QRect &bottom) const override; | 273 | void layoutDecorationRects(QRect &left, QRect &top, QRect &right, QRect &bottom) const override; | ||
274 | 274 | | |||
275 | Xcb::Property fetchFirstInTabBox() const; | 275 | Xcb::Property fetchFirstInTabBox() const; | ||
276 | void readFirstInTabBox(Xcb::Property &property); | 276 | void readFirstInTabBox(Xcb::Property &property); | ||
277 | void updateFirstInTabBox(); | 277 | void updateFirstInTabBox(); | ||
278 | Xcb::StringProperty fetchColorScheme() const; | 278 | Xcb::StringProperty fetchColorScheme() const; | ||
279 | void readColorScheme(Xcb::StringProperty &property); | 279 | void readColorScheme(Xcb::StringProperty &property); | ||
280 | void updateColorScheme() override; | 280 | void updateColorScheme() override; | ||
281 | 281 | | |||
282 | //sets whether the client should be faked as being on all activities (and be shown during session save) | 282 | //sets whether the client should be faked as being on all activities (and be shown during session save) | ||
283 | void setSessionActivityOverride(bool needed); | 283 | void setSessionActivityOverride(bool needed); | ||
284 | virtual bool isClient() const; | 284 | bool isClient() const override; | ||
285 | 285 | | |||
286 | template <typename T> | 286 | template <typename T> | ||
287 | void print(T &stream) const; | 287 | void print(T &stream) const; | ||
288 | 288 | | |||
289 | void cancelFocusOutTimer(); | 289 | void cancelFocusOutTimer(); | ||
290 | 290 | | |||
291 | /** | 291 | /** | ||
292 | * Restores the Client after it had been hidden due to show on screen edge functionality. | 292 | * Restores the Client after it had been hidden due to show on screen edge functionality. | ||
Show All 29 Lines | 320 | public Q_SLOTS: | |||
322 | void updateCaption() override; | 322 | void updateCaption() override; | ||
323 | 323 | | |||
324 | private Q_SLOTS: | 324 | private Q_SLOTS: | ||
325 | void shadeHover(); | 325 | void shadeHover(); | ||
326 | void shadeUnhover(); | 326 | void shadeUnhover(); | ||
327 | 327 | | |||
328 | private: | 328 | private: | ||
329 | // Use Workspace::createClient() | 329 | // Use Workspace::createClient() | ||
330 | virtual ~Client(); ///< Use destroyClient() or releaseWindow() | 330 | ~Client() override; ///< Use destroyClient() or releaseWindow() | ||
331 | 331 | | |||
332 | // Handlers for X11 events | 332 | // Handlers for X11 events | ||
333 | bool mapRequestEvent(xcb_map_request_event_t *e); | 333 | bool mapRequestEvent(xcb_map_request_event_t *e); | ||
334 | void unmapNotifyEvent(xcb_unmap_notify_event_t *e); | 334 | void unmapNotifyEvent(xcb_unmap_notify_event_t *e); | ||
335 | void destroyNotifyEvent(xcb_destroy_notify_event_t *e); | 335 | void destroyNotifyEvent(xcb_destroy_notify_event_t *e); | ||
336 | void configureRequestEvent(xcb_configure_request_event_t *e); | 336 | void configureRequestEvent(xcb_configure_request_event_t *e); | ||
337 | virtual void propertyNotifyEvent(xcb_property_notify_event_t *e) override; | 337 | void propertyNotifyEvent(xcb_property_notify_event_t *e) override; | ||
338 | void clientMessageEvent(xcb_client_message_event_t *e) override; | 338 | void clientMessageEvent(xcb_client_message_event_t *e) override; | ||
339 | void enterNotifyEvent(xcb_enter_notify_event_t *e); | 339 | void enterNotifyEvent(xcb_enter_notify_event_t *e); | ||
340 | void leaveNotifyEvent(xcb_leave_notify_event_t *e); | 340 | void leaveNotifyEvent(xcb_leave_notify_event_t *e); | ||
341 | void focusInEvent(xcb_focus_in_event_t *e); | 341 | void focusInEvent(xcb_focus_in_event_t *e); | ||
342 | void focusOutEvent(xcb_focus_out_event_t *e); | 342 | void focusOutEvent(xcb_focus_out_event_t *e); | ||
343 | virtual void damageNotifyEvent(); | 343 | void damageNotifyEvent() override; | ||
344 | 344 | | |||
345 | bool buttonPressEvent(xcb_window_t w, int button, int state, int x, int y, int x_root, int y_root, xcb_timestamp_t time = XCB_CURRENT_TIME); | 345 | bool buttonPressEvent(xcb_window_t w, int button, int state, int x, int y, int x_root, int y_root, xcb_timestamp_t time = XCB_CURRENT_TIME); | ||
346 | bool buttonReleaseEvent(xcb_window_t w, int button, int state, int x, int y, int x_root, int y_root); | 346 | bool buttonReleaseEvent(xcb_window_t w, int button, int state, int x, int y, int x_root, int y_root); | ||
347 | bool motionNotifyEvent(xcb_window_t w, int state, int x, int y, int x_root, int y_root); | 347 | bool motionNotifyEvent(xcb_window_t w, int state, int x, int y, int x_root, int y_root); | ||
348 | 348 | | |||
349 | Client* findAutogroupCandidate() const; | 349 | Client* findAutogroupCandidate() const; | ||
350 | 350 | | |||
351 | protected: | 351 | protected: | ||
352 | virtual void debug(QDebug& stream) const; | 352 | void debug(QDebug& stream) const override; | ||
353 | void addDamage(const QRegion &damage) override; | 353 | void addDamage(const QRegion &damage) override; | ||
354 | bool belongsToSameApplication(const AbstractClient *other, SameApplicationChecks checks) const override; | 354 | bool belongsToSameApplication(const AbstractClient *other, SameApplicationChecks checks) const override; | ||
355 | void doSetActive() override; | 355 | void doSetActive() override; | ||
356 | void doSetKeepAbove() override; | 356 | void doSetKeepAbove() override; | ||
357 | void doSetKeepBelow() override; | 357 | void doSetKeepBelow() override; | ||
358 | void doSetDesktop(int desktop, int was_desk) override; | 358 | void doSetDesktop(int desktop, int was_desk) override; | ||
359 | void doMinimize() override; | 359 | void doMinimize() override; | ||
360 | void doSetSkipPager() override; | 360 | void doSetSkipPager() override; | ||
▲ Show 20 Lines • Show All 339 Lines • Show Last 20 Lines |