File indexing completed on 2024-12-08 13:22:12
0001 /* 0002 KWin - the KDE window manager 0003 This file is part of the KDE project. 0004 0005 SPDX-FileCopyrightText: 1999, 2000 Matthias Ettrich <ettrich@kde.org> 0006 SPDX-FileCopyrightText: 2003 Lubos Lunak <l.lunak@kde.org> 0007 0008 SPDX-License-Identifier: GPL-2.0-or-later 0009 */ 0010 0011 #pragma once 0012 0013 // kwin 0014 #include "scene/decorationitem.h" 0015 #include "utils/xcbutils.h" 0016 #include "window.h" 0017 // Qt 0018 #include <QElapsedTimer> 0019 #include <QFlags> 0020 #include <QPixmap> 0021 #include <QPointer> 0022 #include <QWindow> 0023 // X 0024 #include <xcb/sync.h> 0025 0026 // TODO: Cleanup the order of things in this .h file 0027 0028 class QTimer; 0029 class KStartupInfoData; 0030 class KStartupInfoId; 0031 0032 namespace KWin 0033 { 0034 0035 /** 0036 * @brief Defines Predicates on how to search for a Client. 0037 * 0038 * Used by Workspace::findClient. 0039 */ 0040 enum class Predicate { 0041 WindowMatch, 0042 WrapperIdMatch, 0043 FrameIdMatch, 0044 InputIdMatch, 0045 }; 0046 0047 /** 0048 * @todo Remove when the X11 platform support is dropped. This decoration renderer 0049 * will be used if compositing is off. 0050 */ 0051 class X11DecorationRenderer : public DecorationRenderer 0052 { 0053 Q_OBJECT 0054 0055 public: 0056 explicit X11DecorationRenderer(Decoration::DecoratedClientImpl *client); 0057 ~X11DecorationRenderer() override; 0058 0059 protected: 0060 void render(const QRegion ®ion) override; 0061 0062 private: 0063 void update(); 0064 0065 QTimer *m_scheduleTimer; 0066 xcb_gcontext_t m_gc; 0067 }; 0068 0069 class KWIN_EXPORT X11Window : public Window 0070 { 0071 Q_OBJECT 0072 /** 0073 * By how much the window wishes to grow/shrink at least. Usually QSize(1,1). 0074 * MAY BE DISOBEYED BY THE WM! It's only for information, do NOT rely on it at all. 0075 * The value is evaluated each time the getter is called. 0076 * Because of that no changed signal is provided. 0077 */ 0078 Q_PROPERTY(QSizeF basicUnit READ basicUnit) 0079 /** 0080 * A client can block compositing. That is while the Client is alive and the state is set, 0081 * Compositing is suspended and is resumed when there are no Clients blocking compositing any 0082 * more. 0083 * 0084 * This is actually set by a window property, unfortunately not used by the target application 0085 * group. For convenience it's exported as a property to the scripts. 0086 * 0087 * Use with care! 0088 */ 0089 Q_PROPERTY(bool blocksCompositing READ isBlockingCompositing WRITE setBlockingCompositing NOTIFY blockingCompositingChanged) 0090 /** 0091 * Whether the Client uses client side window decorations. 0092 * Only GTK+ are detected. 0093 */ 0094 Q_PROPERTY(bool clientSideDecorated READ isClientSideDecorated NOTIFY clientSideDecoratedChanged) 0095 Q_PROPERTY(qulonglong frameId READ frameId CONSTANT) 0096 Q_PROPERTY(qulonglong windowId READ window CONSTANT) 0097 public: 0098 explicit X11Window(); 0099 ~X11Window() override; ///< Use destroyWindow() or releaseWindow() 0100 0101 xcb_window_t wrapperId() const; 0102 xcb_window_t inputId() const 0103 { 0104 return m_decoInputExtent; 0105 } 0106 xcb_window_t frameId() const override; 0107 0108 QRectF inputGeometry() const override; 0109 0110 QPointF framePosToClientPos(const QPointF &point) const override; 0111 QPointF clientPosToFramePos(const QPointF &point) const override; 0112 QSizeF frameSizeToClientSize(const QSizeF &size) const override; 0113 QSizeF clientSizeToFrameSize(const QSizeF &size) const override; 0114 QRectF frameRectToBufferRect(const QRectF &rect) const; 0115 QSizeF implicitSize() const; 0116 0117 QMatrix4x4 inputTransformation() const override; 0118 0119 bool isTransient() const override; 0120 bool groupTransient() const override; 0121 bool wasOriginallyGroupTransient() const; 0122 QList<Window *> mainWindows() const override; // Call once before loop , is not indirect 0123 bool hasTransient(const Window *c, bool indirect) const override; 0124 void checkTransient(xcb_window_t w); 0125 Window *findModal(bool allow_itself = false) override; 0126 const Group *group() const override; 0127 Group *group() override; 0128 void checkGroup(Group *gr = nullptr, bool force = false); 0129 void changeClientLeaderGroup(Group *gr); 0130 bool supportsWindowRules() const override; 0131 void updateWindowRules(Rules::Types selection) override; 0132 void applyWindowRules() override; 0133 void updateFullscreenMonitors(NETFullscreenMonitors topology); 0134 0135 bool hasNETSupport() const; 0136 0137 QSizeF minSize() const override; 0138 QSizeF maxSize() const override; 0139 QSizeF basicUnit() const; 0140 QPointF inputPos() const 0141 { 0142 return input_offset; 0143 } // Inside of geometry() 0144 0145 bool windowEvent(xcb_generic_event_t *e); 0146 NET::WindowType windowType(bool direct = false, int supported_types = 0) const override; 0147 0148 bool manage(xcb_window_t w, bool isMapped); 0149 void releaseWindow(bool on_shutdown = false); 0150 void destroyWindow() override; 0151 0152 QStringList activities() const override; 0153 void doSetOnActivities(const QStringList &newActivitiesList) override; 0154 void updateActivities(bool includeTransients) override; 0155 0156 /// Is not minimized and not hidden. I.e. normally visible on some virtual desktop. 0157 bool isShown() const override; 0158 bool isHiddenInternal() const override; // For compositing 0159 0160 bool isShadeable() const override; 0161 bool isMaximizable() const override; 0162 MaximizeMode maximizeMode() const override; 0163 void maximize(MaximizeMode mode) override; 0164 0165 bool isMinimizable() const override; 0166 QRectF iconGeometry() const override; 0167 0168 bool isFullScreenable() const override; 0169 void setFullScreen(bool set, bool user = true) override; 0170 bool isFullScreen() const override; 0171 bool userCanSetFullScreen() const override; 0172 int fullScreenMode() const 0173 { 0174 return m_fullscreenMode; // only for session saving 0175 } 0176 0177 bool userNoBorder() const; 0178 bool noBorder() const override; 0179 void setNoBorder(bool set) override; 0180 bool userCanSetNoBorder() const override; 0181 void checkNoBorder() override; 0182 void checkActivities() override; 0183 0184 int sessionStackingOrder() const; 0185 0186 // Auxiliary functions, depend on the windowType 0187 bool wantsInput() const override; 0188 0189 bool isResizable() const override; 0190 bool isMovable() const override; 0191 bool isMovableAcrossScreens() const override; 0192 bool isCloseable() const override; ///< May be closed by the user (May have a close button) 0193 0194 bool takeFocus() override; 0195 0196 void invalidateDecoration() override; 0197 0198 void updateShape(); 0199 0200 /// resizeWithChecks() resizes according to gravity, and checks workarea position 0201 QRectF resizeWithChecks(const QRectF &geometry, const QSizeF &size) override; 0202 QRectF resizeWithChecks(const QRectF &geometry, qreal w, qreal h, xcb_gravity_t gravity); 0203 QRectF resizeWithChecks(const QRectF &geometry, const QSizeF &s, xcb_gravity_t gravity); 0204 QSizeF constrainClientSize(const QSizeF &size, SizeMode mode = SizeModeAny) const override; 0205 0206 bool providesContextHelp() const override; 0207 0208 xcb_colormap_t colormap() const; 0209 0210 /// Updates visibility depending on being shaded, virtual desktop, etc. 0211 void updateVisibility(); 0212 /// Hides a client - Basically like minimize, but without effects, it's simply hidden 0213 void hideClient() override; 0214 void showClient() override; 0215 bool hiddenPreview() const; ///< Window is mapped in order to get a window pixmap 0216 0217 bool setupCompositing() override; 0218 void finishCompositing(ReleaseReason releaseReason = ReleaseReason::Release) override; 0219 void setBlockingCompositing(bool block); 0220 inline bool isBlockingCompositing() 0221 { 0222 return blocks_compositing; 0223 } 0224 0225 QString captionNormal() const override 0226 { 0227 return cap_normal; 0228 } 0229 QString captionSuffix() const override 0230 { 0231 return cap_suffix; 0232 } 0233 0234 using Window::keyPressEvent; 0235 void keyPressEvent(uint key_code, xcb_timestamp_t time); // FRAME ?? 0236 void updateMouseGrab() override; 0237 xcb_window_t moveResizeGrabWindow() const; 0238 0239 QPointF gravityAdjustment(xcb_gravity_t gravity) const; 0240 const QPointF calculateGravitation(bool invert) const; 0241 0242 void NETMoveResize(qreal x_root, qreal y_root, NET::Direction direction); 0243 void NETMoveResizeWindow(int flags, qreal x, qreal y, qreal width, qreal height); 0244 void GTKShowWindowMenu(qreal x_root, qreal y_root); 0245 void restackWindow(xcb_window_t above, int detail, NET::RequestSource source, xcb_timestamp_t timestamp, 0246 bool send_event = false); 0247 0248 void gotPing(xcb_timestamp_t timestamp); 0249 0250 void updateUserTime(xcb_timestamp_t time = XCB_TIME_CURRENT_TIME); 0251 xcb_timestamp_t userTime() const override; 0252 bool hasUserTimeSupport() const; 0253 0254 /// Does 'delete c;' 0255 static void deleteClient(X11Window *c); 0256 0257 static bool belongToSameApplication(const X11Window *c1, const X11Window *c2, SameApplicationChecks checks = SameApplicationChecks()); 0258 static bool sameAppWindowRoleMatch(const X11Window *c1, const X11Window *c2, bool active_hack); 0259 0260 void killWindow() override; 0261 void showContextHelp() override; 0262 void checkActiveModal(); 0263 0264 StrutRect strutRect(StrutArea area) const override; 0265 bool hasStrut() const override; 0266 0267 bool isClientSideDecorated() const; 0268 0269 Xcb::Property fetchFirstInTabBox() const; 0270 void readFirstInTabBox(Xcb::Property &property); 0271 void updateFirstInTabBox(); 0272 Xcb::StringProperty fetchPreferredColorScheme() const; 0273 QString readPreferredColorScheme(Xcb::StringProperty &property) const; 0274 QString preferredColorScheme() const override; 0275 0276 // sets whether the client should be faked as being on all activities (and be shown during session save) 0277 void setSessionActivityOverride(bool needed); 0278 bool isClient() const override; 0279 0280 void cancelFocusOutTimer(); 0281 0282 /** 0283 * Restores the Client after it had been hidden due to show on screen edge functionality. 0284 * In addition the property gets deleted so that the Client knows that it is visible again. 0285 */ 0286 void showOnScreenEdge() override; 0287 0288 Xcb::StringProperty fetchApplicationMenuServiceName() const; 0289 void readApplicationMenuServiceName(Xcb::StringProperty &property); 0290 void checkApplicationMenuServiceName(); 0291 0292 Xcb::StringProperty fetchApplicationMenuObjectPath() const; 0293 void readApplicationMenuObjectPath(Xcb::StringProperty &property); 0294 void checkApplicationMenuObjectPath(); 0295 0296 struct SyncRequest 0297 { 0298 xcb_sync_counter_t counter; 0299 xcb_sync_int64_t value; 0300 xcb_sync_alarm_t alarm; 0301 xcb_timestamp_t lastTimestamp; 0302 QTimer *timeout, *failsafeTimeout; 0303 bool isPending; 0304 bool interactiveResize; 0305 }; 0306 const SyncRequest &syncRequest() const 0307 { 0308 return m_syncRequest; 0309 } 0310 virtual bool wantsSyncCounter() const; 0311 void handleSync(); 0312 void handleSyncTimeout(); 0313 0314 bool allowWindowActivation(xcb_timestamp_t time = -1U, bool focus_in = false, 0315 bool ignore_desktop = false); 0316 0317 static void cleanupX11(); 0318 0319 public Q_SLOTS: 0320 void closeWindow() override; 0321 void updateCaption() override; 0322 0323 private: 0324 // Handlers for X11 events 0325 bool mapRequestEvent(xcb_map_request_event_t *e); 0326 void unmapNotifyEvent(xcb_unmap_notify_event_t *e); 0327 void destroyNotifyEvent(xcb_destroy_notify_event_t *e); 0328 void configureRequestEvent(xcb_configure_request_event_t *e); 0329 void propertyNotifyEvent(xcb_property_notify_event_t *e) override; 0330 void clientMessageEvent(xcb_client_message_event_t *e) override; 0331 void enterNotifyEvent(xcb_enter_notify_event_t *e); 0332 void leaveNotifyEvent(xcb_leave_notify_event_t *e); 0333 void focusInEvent(xcb_focus_in_event_t *e); 0334 void focusOutEvent(xcb_focus_out_event_t *e); 0335 void damageNotifyEvent(); 0336 0337 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); 0338 bool buttonReleaseEvent(xcb_window_t w, int button, int state, int x, int y, int x_root, int y_root); 0339 bool motionNotifyEvent(xcb_window_t w, int state, int x, int y, int x_root, int y_root); 0340 0341 protected: 0342 bool belongsToSameApplication(const Window *other, SameApplicationChecks checks) const override; 0343 void doSetActive() override; 0344 void doSetKeepAbove() override; 0345 void doSetKeepBelow() override; 0346 void doSetShade(ShadeMode previousShadeMode) override; 0347 void doSetDesktop() override; 0348 void doMinimize() override; 0349 void doSetSkipPager() override; 0350 void doSetSkipTaskbar() override; 0351 void doSetSkipSwitcher() override; 0352 void doSetDemandsAttention() override; 0353 bool belongsToDesktop() const override; 0354 bool doStartInteractiveMoveResize() override; 0355 bool isWaitingForInteractiveMoveResizeSync() const override; 0356 void doInteractiveResizeSync(const QRectF &rect) override; 0357 QSizeF resizeIncrements() const override; 0358 bool acceptsFocus() const override; 0359 void moveResizeInternal(const QRectF &rect, MoveResizeMode mode) override; 0360 std::unique_ptr<WindowItem> createItem(Scene *scene) override; 0361 0362 // Signals for the scripting interface 0363 // Signals make an excellent way for communication 0364 // in between objects as compared to simple function 0365 // calls 0366 Q_SIGNALS: 0367 void clientManaging(KWin::X11Window *); 0368 void clientFullScreenSet(KWin::X11Window *, bool, bool); 0369 0370 /** 0371 * Emitted whenever the Client want to show it menu 0372 */ 0373 void showRequest(); 0374 /** 0375 * Emitted whenever the Client's menu is closed 0376 */ 0377 void menuHidden(); 0378 /** 0379 * Emitted whenever the Client's menu is available 0380 */ 0381 void appMenuAvailable(); 0382 /** 0383 * Emitted whenever the Client's menu is unavailable 0384 */ 0385 void appMenuUnavailable(); 0386 0387 /** 0388 * Emitted whenever the Client's block compositing state changes. 0389 */ 0390 void blockingCompositingChanged(KWin::X11Window *client); 0391 void clientSideDecoratedChanged(); 0392 0393 private: 0394 void exportMappingState(int s); // ICCCM 4.1.3.1, 4.1.4, NETWM 2.5.1 0395 bool isManaged() const; ///< Returns false if this client is not yet managed 0396 void updateAllowedActions(bool force = false); 0397 QRect fullscreenMonitorsArea(NETFullscreenMonitors topology) const; 0398 void getWmNormalHints(); 0399 void getMotifHints(); 0400 void getIcons(); 0401 void fetchName(); 0402 void fetchIconicName(); 0403 QString readName() const; 0404 void setCaption(const QString &s, bool force = false); 0405 bool hasTransientInternal(const X11Window *c, bool indirect, QList<const X11Window *> &set) const; 0406 void setShortcutInternal() override; 0407 0408 void configureRequest(int value_mask, qreal rx, qreal ry, qreal rw, qreal rh, int gravity, bool from_tool); 0409 NETExtendedStrut strut() const; 0410 int checkShadeGeometry(int w, int h); 0411 void getSyncCounter(); 0412 void sendSyncRequest(); 0413 void leaveInteractiveMoveResize() override; 0414 void performInteractiveResize(); 0415 void establishCommandWindowGrab(uint8_t button); 0416 void establishCommandAllGrab(uint8_t button); 0417 void resizeDecoration(); 0418 0419 void pingWindow(); 0420 void killProcess(bool ask, xcb_timestamp_t timestamp = XCB_TIME_CURRENT_TIME); 0421 void updateUrgency(); 0422 static void sendClientMessage(xcb_window_t w, xcb_atom_t a, xcb_atom_t protocol, 0423 uint32_t data1 = 0, uint32_t data2 = 0, uint32_t data3 = 0); 0424 0425 void embedClient(xcb_window_t w, xcb_visualid_t visualid, xcb_colormap_t colormap, uint8_t depth); 0426 void detectNoBorder(); 0427 void updateFrameExtents(); 0428 void setClientFrameExtents(const NETStrut &strut); 0429 0430 void internalShow(); 0431 void internalHide(); 0432 void internalKeep(); 0433 void map(); 0434 void unmap(); 0435 void updateHiddenPreview(); 0436 0437 void updateInputShape(); 0438 void updateServerGeometry(); 0439 void discardWindowPixmap(); 0440 void updateWindowPixmap(); 0441 0442 xcb_timestamp_t readUserTimeMapTimestamp(const KStartupInfoId *asn_id, const KStartupInfoData *asn_data, 0443 bool session) const; 0444 xcb_timestamp_t readUserCreationTime() const; 0445 void startupIdChanged(); 0446 0447 void updateInputWindow(); 0448 0449 Xcb::Property fetchShowOnScreenEdge() const; 0450 void readShowOnScreenEdge(Xcb::Property &property); 0451 /** 0452 * Reads the property and creates/destroys the screen edge if required 0453 * and shows/hides the client. 0454 */ 0455 void updateShowOnScreenEdge(); 0456 0457 void maybeCreateX11DecorationRenderer(); 0458 void maybeDestroyX11DecorationRenderer(); 0459 void updateDecoration(bool check_workspace_pos, bool force = false); 0460 void createDecoration(const QRectF &oldgeom); 0461 void destroyDecoration(); 0462 0463 Xcb::Window m_client; 0464 Xcb::Window m_wrapper; 0465 Xcb::Window m_frame; 0466 int m_activityUpdatesBlocked; 0467 bool m_blockedActivityUpdatesRequireTransients; 0468 Xcb::Window m_moveResizeGrabWindow; 0469 bool move_resize_has_keyboard_grab; 0470 bool m_managed; 0471 0472 Xcb::GeometryHints m_geometryHints; 0473 void sendSyntheticConfigureNotify(); 0474 enum MappingState { 0475 Withdrawn, ///< Not handled, as per ICCCM WithdrawnState 0476 Mapped, ///< The frame is mapped 0477 Unmapped, ///< The frame is not mapped 0478 Kept ///< The frame should be unmapped, but is kept (For compositing) 0479 }; 0480 MappingState mapping_state; 0481 0482 Xcb::TransientFor fetchTransient() const; 0483 void readTransientProperty(Xcb::TransientFor &transientFor); 0484 void readTransient(); 0485 xcb_window_t verifyTransientFor(xcb_window_t transient_for, bool set); 0486 void addTransient(Window *cl) override; 0487 void removeTransient(Window *cl) override; 0488 void removeFromMainClients(); 0489 void cleanGrouping(); 0490 void checkGroupTransients(); 0491 void setTransient(xcb_window_t new_transient_for_id); 0492 xcb_window_t m_transientForId; 0493 xcb_window_t m_originalTransientForId; 0494 X11Window *shade_below; 0495 Xcb::MotifHints m_motif; 0496 uint hidden : 1; ///< Forcibly hidden by calling hide() 0497 uint noborder : 1; 0498 uint app_noborder : 1; ///< App requested no border via window type, shape extension, etc. 0499 uint ignore_focus_stealing : 1; ///< Don't apply focus stealing prevention to this client 0500 bool blocks_compositing; 0501 0502 enum FullScreenMode { 0503 FullScreenNone, 0504 FullScreenNormal 0505 } m_fullscreenMode; 0506 0507 MaximizeMode max_mode; 0508 xcb_colormap_t m_colormap; 0509 QString cap_normal, cap_iconic, cap_suffix; 0510 Group *in_group; 0511 QTimer *ping_timer; 0512 qint64 m_killHelperPID; 0513 xcb_timestamp_t m_pingTimestamp; 0514 xcb_timestamp_t m_userTime; 0515 NET::Actions allowed_actions; 0516 bool shade_geometry_change; 0517 SyncRequest m_syncRequest; 0518 static bool check_active_modal; ///< \see X11Window::checkActiveModal() 0519 int sm_stacking_order; 0520 friend struct ResetupRulesProcedure; 0521 0522 friend bool performTransiencyCheck(); 0523 0524 Xcb::StringProperty fetchActivities() const; 0525 void readActivities(Xcb::StringProperty &property); 0526 bool activitiesDefined; // whether the x property was actually set 0527 0528 bool sessionActivityOverride; 0529 0530 Xcb::Window m_decoInputExtent; 0531 QPointF input_offset; 0532 0533 QTimer *m_focusOutTimer; 0534 0535 QMetaObject::Connection m_edgeRemoveConnection; 0536 QMetaObject::Connection m_edgeGeometryTrackingConnection; 0537 0538 QMarginsF m_clientFrameExtents; 0539 Output *m_lastOutput = nullptr; 0540 QRectF m_lastBufferGeometry; 0541 QRectF m_lastFrameGeometry; 0542 QRectF m_lastClientGeometry; 0543 std::unique_ptr<X11DecorationRenderer> m_decorationRenderer; 0544 }; 0545 0546 inline xcb_window_t X11Window::wrapperId() const 0547 { 0548 return m_wrapper; 0549 } 0550 0551 inline bool X11Window::isClientSideDecorated() const 0552 { 0553 return !m_clientFrameExtents.isNull(); 0554 } 0555 0556 inline bool X11Window::groupTransient() const 0557 { 0558 return m_transientForId == kwinApp()->x11RootWindow(); 0559 } 0560 0561 // Needed because verifyTransientFor() may set transient_for_id to root window, 0562 // if the original value has a problem (window doesn't exist, etc.) 0563 inline bool X11Window::wasOriginallyGroupTransient() const 0564 { 0565 return m_originalTransientForId == kwinApp()->x11RootWindow(); 0566 } 0567 0568 inline bool X11Window::isTransient() const 0569 { 0570 return m_transientForId != XCB_WINDOW_NONE; 0571 } 0572 0573 inline const Group *X11Window::group() const 0574 { 0575 return in_group; 0576 } 0577 0578 inline Group *X11Window::group() 0579 { 0580 return in_group; 0581 } 0582 0583 inline bool X11Window::isShown() const 0584 { 0585 return !isMinimized() && !hidden; 0586 } 0587 0588 inline bool X11Window::isHiddenInternal() const 0589 { 0590 return hidden; 0591 } 0592 0593 inline MaximizeMode X11Window::maximizeMode() const 0594 { 0595 return max_mode; 0596 } 0597 0598 inline bool X11Window::isFullScreen() const 0599 { 0600 return m_fullscreenMode != FullScreenNone; 0601 } 0602 0603 inline bool X11Window::hasNETSupport() const 0604 { 0605 return info->hasNETSupport(); 0606 } 0607 0608 inline xcb_colormap_t X11Window::colormap() const 0609 { 0610 return m_colormap; 0611 } 0612 0613 inline int X11Window::sessionStackingOrder() const 0614 { 0615 return sm_stacking_order; 0616 } 0617 0618 inline bool X11Window::isManaged() const 0619 { 0620 return m_managed; 0621 } 0622 0623 inline QRectF X11Window::resizeWithChecks(const QRectF &geometry, const QSizeF &s) 0624 { 0625 return resizeWithChecks(geometry, s.width(), s.height(), XCB_GRAVITY_BIT_FORGET); 0626 } 0627 0628 inline QRectF X11Window::resizeWithChecks(const QRectF &geometry, const QSizeF &s, xcb_gravity_t gravity) 0629 { 0630 return resizeWithChecks(geometry, s.width(), s.height(), gravity); 0631 } 0632 0633 inline bool X11Window::hasUserTimeSupport() const 0634 { 0635 return info->userTime() != -1U; 0636 } 0637 0638 inline xcb_window_t X11Window::moveResizeGrabWindow() const 0639 { 0640 return m_moveResizeGrabWindow; 0641 } 0642 0643 inline bool X11Window::hiddenPreview() const 0644 { 0645 return mapping_state == Kept; 0646 } 0647 0648 } // namespace 0649 Q_DECLARE_METATYPE(KWin::X11Window *) 0650 Q_DECLARE_METATYPE(QList<KWin::X11Window *>)