Changeset View
Changeset View
Standalone View
Standalone View
client.h
Show First 20 Lines • Show All 90 Lines • ▼ Show 20 Line(s) | 66 | { | |||
---|---|---|---|---|---|
91 | * Whether the Client uses client side window decorations. | 91 | * Whether the Client uses client side window decorations. | ||
92 | * Only GTK+ are detected. | 92 | * Only GTK+ are detected. | ||
93 | **/ | 93 | **/ | ||
94 | Q_PROPERTY(bool clientSideDecorated READ isClientSideDecorated NOTIFY clientSideDecoratedChanged) | 94 | Q_PROPERTY(bool clientSideDecorated READ isClientSideDecorated NOTIFY clientSideDecoratedChanged) | ||
95 | public: | 95 | public: | ||
96 | explicit Client(); | 96 | explicit Client(); | ||
97 | xcb_window_t wrapperId() const; | 97 | xcb_window_t wrapperId() const; | ||
98 | xcb_window_t inputId() const { return m_decoInputExtent; } | 98 | xcb_window_t inputId() const { return m_decoInputExtent; } | ||
99 | virtual xcb_window_t frameId() const override; | 99 | xcb_window_t frameId() const override; | ||
100 | 100 | | |||
101 | bool isTransient() const override; | 101 | bool isTransient() const override; | ||
102 | bool groupTransient() const; | 102 | bool groupTransient() const; | ||
103 | bool wasOriginallyGroupTransient() const; | 103 | bool wasOriginallyGroupTransient() const; | ||
104 | QList<AbstractClient*> mainClients() const override; // Call once before loop , is not indirect | 104 | QList<AbstractClient*> mainClients() const override; // Call once before loop , is not indirect | ||
105 | bool hasTransient(const AbstractClient* c, bool indirect) const override; | 105 | bool hasTransient(const AbstractClient* c, bool indirect) const override; | ||
106 | void checkTransient(xcb_window_t w); | 106 | void checkTransient(xcb_window_t w); | ||
107 | AbstractClient* findModal(bool allow_itself = false) override; | 107 | AbstractClient* findModal(bool allow_itself = false) override; | ||
108 | const Group* group() const; | 108 | const Group* group() const; | ||
109 | Group* group(); | 109 | Group* group(); | ||
110 | void checkGroup(Group* gr = NULL, bool force = false); | 110 | void checkGroup(Group* gr = NULL, bool force = false); | ||
111 | void changeClientLeaderGroup(Group* gr); | 111 | void changeClientLeaderGroup(Group* gr); | ||
112 | const WindowRules* rules() const override; | 112 | const WindowRules* rules() const override; | ||
113 | void removeRule(Rules* r); | 113 | void removeRule(Rules* r); | ||
114 | void setupWindowRules(bool ignore_temporary); | 114 | void setupWindowRules(bool ignore_temporary); | ||
115 | void applyWindowRules(); | 115 | void applyWindowRules(); | ||
116 | void updateWindowRules(Rules::Types selection) override; | 116 | void updateWindowRules(Rules::Types selection) override; | ||
117 | void updateFullscreenMonitors(NETFullscreenMonitors topology); | 117 | void updateFullscreenMonitors(NETFullscreenMonitors topology); | ||
118 | 118 | | |||
119 | bool hasNETSupport() const; | 119 | bool hasNETSupport() const; | ||
120 | 120 | | |||
121 | QSize minSize() const override; | 121 | QSize minSize() const override; | ||
122 | QSize maxSize() const override; | 122 | QSize maxSize() const override; | ||
123 | QSize basicUnit() const; | 123 | QSize basicUnit() const; | ||
124 | virtual QSize clientSize() const; | 124 | QSize clientSize() const override; | ||
125 | QPoint inputPos() const { return input_offset; } // Inside of geometry() | 125 | QPoint inputPos() const { return input_offset; } // Inside of geometry() | ||
126 | 126 | | |||
127 | bool windowEvent(xcb_generic_event_t *e); | 127 | bool windowEvent(xcb_generic_event_t *e); | ||
128 | void syncEvent(xcb_sync_alarm_notify_event_t* e); | 128 | void syncEvent(xcb_sync_alarm_notify_event_t* e); | ||
129 | NET::WindowType windowType(bool direct = false, int supported_types = 0) const; | 129 | NET::WindowType windowType(bool direct = false, int supported_types = 0) const override; | ||
130 | 130 | | |||
131 | bool manage(xcb_window_t w, bool isMapped); | 131 | bool manage(xcb_window_t w, bool isMapped); | ||
132 | void releaseWindow(bool on_shutdown = false); | 132 | void releaseWindow(bool on_shutdown = false); | ||
133 | void destroyClient(); | 133 | void destroyClient(); | ||
134 | 134 | | |||
135 | virtual int desktop() const; | 135 | int desktop() const override; | ||
136 | 136 | | |||
137 | virtual QStringList activities() const; | 137 | QStringList activities() const override; | ||
138 | void setOnActivity(const QString &activity, bool enable); | 138 | void setOnActivity(const QString &activity, bool enable); | ||
139 | void setOnAllActivities(bool set) override; | 139 | void setOnAllActivities(bool set) override; | ||
140 | void setOnActivities(QStringList newActivitiesList); | 140 | void setOnActivities(QStringList newActivitiesList); | ||
141 | void updateActivities(bool includeTransients); | 141 | void updateActivities(bool includeTransients); | ||
142 | void blockActivityUpdates(bool b = true) override; | 142 | void blockActivityUpdates(bool b = true) override; | ||
143 | 143 | | |||
144 | /// Is not minimized and not hidden. I.e. normally visible on some virtual desktop. | 144 | /// Is not minimized and not hidden. I.e. normally visible on some virtual desktop. | ||
145 | bool isShown(bool shaded_is_shown) const override; | 145 | bool isShown(bool shaded_is_shown) const override; | ||
▲ Show 20 Lines • Show All 67 Lines • ▼ Show 20 Line(s) | |||||
213 | xcb_colormap_t colormap() const; | 213 | xcb_colormap_t colormap() const; | ||
214 | 214 | | |||
215 | /// Updates visibility depending on being shaded, virtual desktop, etc. | 215 | /// Updates visibility depending on being shaded, virtual desktop, etc. | ||
216 | void updateVisibility(); | 216 | void updateVisibility(); | ||
217 | /// Hides a client - Basically like minimize, but without effects, it's simply hidden | 217 | /// Hides a client - Basically like minimize, but without effects, it's simply hidden | ||
218 | void hideClient(bool hide) override; | 218 | void hideClient(bool hide) override; | ||
219 | bool hiddenPreview() const; ///< Window is mapped in order to get a window pixmap | 219 | bool hiddenPreview() const; ///< Window is mapped in order to get a window pixmap | ||
220 | 220 | | |||
221 | virtual bool setupCompositing(); | 221 | bool setupCompositing() override; | ||
222 | void finishCompositing(ReleaseReason releaseReason = ReleaseReason::Release) override; | 222 | void finishCompositing(ReleaseReason releaseReason = ReleaseReason::Release) override; | ||
223 | void setBlockingCompositing(bool block); | 223 | void setBlockingCompositing(bool block); | ||
224 | inline bool isBlockingCompositing() { return blocks_compositing; } | 224 | inline bool isBlockingCompositing() { return blocks_compositing; } | ||
225 | 225 | | |||
226 | QString caption(bool full = true, bool stripped = false) const override; | 226 | QString caption(bool full = true, bool stripped = false) const override; | ||
227 | 227 | | |||
228 | using AbstractClient::keyPressEvent; | 228 | using AbstractClient::keyPressEvent; | ||
229 | void keyPressEvent(uint key_code, xcb_timestamp_t time); // FRAME ?? | 229 | void keyPressEvent(uint key_code, xcb_timestamp_t time); // FRAME ?? | ||
▲ Show 20 Lines • Show All 65 Lines • ▼ Show 20 Line(s) | |||||
295 | 295 | | |||
296 | /** | 296 | /** | ||
297 | * Whether or not the window has a strut that expands through the invisible area of | 297 | * Whether or not the window has a strut that expands through the invisible area of | ||
298 | * an xinerama setup where the monitors are not the same resolution. | 298 | * an xinerama setup where the monitors are not the same resolution. | ||
299 | */ | 299 | */ | ||
300 | bool hasOffscreenXineramaStrut() const; | 300 | bool hasOffscreenXineramaStrut() const; | ||
301 | 301 | | |||
302 | // Decorations <-> Effects | 302 | // Decorations <-> Effects | ||
303 | QRect decorationRect() const; | 303 | QRect decorationRect() const override; | ||
304 | 304 | | |||
305 | QRect transparentRect() const; | 305 | QRect transparentRect() const override; | ||
306 | 306 | | |||
307 | bool isClientSideDecorated() const; | 307 | bool isClientSideDecorated() const; | ||
308 | bool wantsShadowToBeRendered() const override; | 308 | bool wantsShadowToBeRendered() const override; | ||
309 | 309 | | |||
310 | void layoutDecorationRects(QRect &left, QRect &top, QRect &right, QRect &bottom) const override; | 310 | void layoutDecorationRects(QRect &left, QRect &top, QRect &right, QRect &bottom) const override; | ||
311 | 311 | | |||
312 | Xcb::Property fetchFirstInTabBox() const; | 312 | Xcb::Property fetchFirstInTabBox() const; | ||
313 | void readFirstInTabBox(Xcb::Property &property); | 313 | void readFirstInTabBox(Xcb::Property &property); | ||
314 | void updateFirstInTabBox(); | 314 | void updateFirstInTabBox(); | ||
315 | Xcb::StringProperty fetchColorScheme() const; | 315 | Xcb::StringProperty fetchColorScheme() const; | ||
316 | void readColorScheme(Xcb::StringProperty &property); | 316 | void readColorScheme(Xcb::StringProperty &property); | ||
317 | void updateColorScheme(); | 317 | void updateColorScheme(); | ||
318 | 318 | | |||
319 | //sets whether the client should be treated as a SessionInteract window | 319 | //sets whether the client should be treated as a SessionInteract window | ||
320 | void setSessionInteract(bool needed); | 320 | void setSessionInteract(bool needed); | ||
321 | virtual bool isClient() const; | 321 | bool isClient() const override; | ||
322 | 322 | | |||
323 | template <typename T> | 323 | template <typename T> | ||
324 | void print(T &stream) const; | 324 | void print(T &stream) const; | ||
325 | 325 | | |||
326 | void cancelFocusOutTimer(); | 326 | void cancelFocusOutTimer(); | ||
327 | 327 | | |||
328 | /** | 328 | /** | ||
329 | * Restores the Client after it had been hidden due to show on screen edge functionality. | 329 | * Restores the Client after it had been hidden due to show on screen edge functionality. | ||
Show All 17 Lines | 344 | public Q_SLOTS: | |||
347 | void evaluateWindowRules(); | 347 | void evaluateWindowRules(); | ||
348 | 348 | | |||
349 | private Q_SLOTS: | 349 | private Q_SLOTS: | ||
350 | void shadeHover(); | 350 | void shadeHover(); | ||
351 | void shadeUnhover(); | 351 | void shadeUnhover(); | ||
352 | 352 | | |||
353 | private: | 353 | private: | ||
354 | // Use Workspace::createClient() | 354 | // Use Workspace::createClient() | ||
355 | virtual ~Client(); ///< Use destroyClient() or releaseWindow() | 355 | ~Client() override; ///< Use destroyClient() or releaseWindow() | ||
356 | 356 | | |||
357 | // Handlers for X11 events | 357 | // Handlers for X11 events | ||
358 | bool mapRequestEvent(xcb_map_request_event_t *e); | 358 | bool mapRequestEvent(xcb_map_request_event_t *e); | ||
359 | void unmapNotifyEvent(xcb_unmap_notify_event_t *e); | 359 | void unmapNotifyEvent(xcb_unmap_notify_event_t *e); | ||
360 | void destroyNotifyEvent(xcb_destroy_notify_event_t *e); | 360 | void destroyNotifyEvent(xcb_destroy_notify_event_t *e); | ||
361 | void configureRequestEvent(xcb_configure_request_event_t *e); | 361 | void configureRequestEvent(xcb_configure_request_event_t *e); | ||
362 | virtual void propertyNotifyEvent(xcb_property_notify_event_t *e) override; | 362 | void propertyNotifyEvent(xcb_property_notify_event_t *e) override; | ||
363 | void clientMessageEvent(xcb_client_message_event_t *e) override; | 363 | void clientMessageEvent(xcb_client_message_event_t *e) override; | ||
364 | void enterNotifyEvent(xcb_enter_notify_event_t *e); | 364 | void enterNotifyEvent(xcb_enter_notify_event_t *e); | ||
365 | void leaveNotifyEvent(xcb_leave_notify_event_t *e); | 365 | void leaveNotifyEvent(xcb_leave_notify_event_t *e); | ||
366 | void focusInEvent(xcb_focus_in_event_t *e); | 366 | void focusInEvent(xcb_focus_in_event_t *e); | ||
367 | void focusOutEvent(xcb_focus_out_event_t *e); | 367 | void focusOutEvent(xcb_focus_out_event_t *e); | ||
368 | virtual void damageNotifyEvent(); | 368 | void damageNotifyEvent() override; | ||
369 | 369 | | |||
370 | 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); | 370 | 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); | ||
371 | bool buttonReleaseEvent(xcb_window_t w, int button, int state, int x, int y, int x_root, int y_root); | 371 | bool buttonReleaseEvent(xcb_window_t w, int button, int state, int x, int y, int x_root, int y_root); | ||
372 | bool motionNotifyEvent(xcb_window_t w, int state, int x, int y, int x_root, int y_root); | 372 | bool motionNotifyEvent(xcb_window_t w, int state, int x, int y, int x_root, int y_root); | ||
373 | 373 | | |||
374 | Client* findAutogroupCandidate() const; | 374 | Client* findAutogroupCandidate() const; | ||
375 | 375 | | |||
376 | protected: | 376 | protected: | ||
377 | virtual void debug(QDebug& stream) const; | 377 | void debug(QDebug& stream) const override; | ||
378 | void addDamage(const QRegion &damage) override; | 378 | void addDamage(const QRegion &damage) override; | ||
379 | bool belongsToSameApplication(const AbstractClient *other, bool active_hack) const override; | 379 | bool belongsToSameApplication(const AbstractClient *other, bool active_hack) const override; | ||
380 | void doSetActive() override; | 380 | void doSetActive() override; | ||
381 | void doSetKeepAbove() override; | 381 | void doSetKeepAbove() override; | ||
382 | void doSetKeepBelow() override; | 382 | void doSetKeepBelow() override; | ||
383 | void doSetDesktop(int desktop, int was_desk) override; | 383 | void doSetDesktop(int desktop, int was_desk) override; | ||
384 | void doMinimize() override; | 384 | void doMinimize() override; | ||
385 | void doSetSkipPager() override; | 385 | void doSetSkipPager() override; | ||
▲ Show 20 Lines • Show All 384 Lines • Show Last 20 Lines |