Changeset View
Changeset View
Standalone View
Standalone View
src/declarativeimports/core/windowthumbnail.h
Show All 21 Lines | |||||
22 | #include <config-x11.h> | 22 | #include <config-x11.h> | ||
23 | 23 | | |||
24 | #include <cstdint> | 24 | #include <cstdint> | ||
25 | 25 | | |||
26 | // Qt | 26 | // Qt | ||
27 | #include <QAbstractNativeEventFilter> | 27 | #include <QAbstractNativeEventFilter> | ||
28 | #include <QSGSimpleTextureNode> | 28 | #include <QSGSimpleTextureNode> | ||
29 | #include <QQuickItem> | 29 | #include <QQuickItem> | ||
30 | #include <QPointer> | ||||
31 | #include <QWindow> | ||||
30 | // xcb | 32 | // xcb | ||
31 | #if HAVE_XCB_COMPOSITE | 33 | #if HAVE_XCB_COMPOSITE | ||
32 | #include <xcb/damage.h> | 34 | #include <xcb/damage.h> | ||
33 | 35 | | |||
34 | #if HAVE_EGL | 36 | #if HAVE_EGL | ||
35 | #include <EGL/egl.h> | 37 | #include <EGL/egl.h> | ||
36 | #include <EGL/eglext.h> | 38 | #include <EGL/eglext.h> | ||
37 | #include <fixx11h.h> // egl.h could include XLib.h | 39 | #include <fixx11h.h> // egl.h could include XLib.h | ||
▲ Show 20 Lines • Show All 57 Lines • ▼ Show 20 Line(s) | 86 | public: | |||
95 | bool thumbnailAvailable() const; | 97 | bool thumbnailAvailable() const; | ||
96 | 98 | | |||
97 | Q_SIGNALS: | 99 | Q_SIGNALS: | ||
98 | void winIdChanged(); | 100 | void winIdChanged(); | ||
99 | void paintedSizeChanged(); | 101 | void paintedSizeChanged(); | ||
100 | void thumbnailAvailableChanged(); | 102 | void thumbnailAvailableChanged(); | ||
101 | 103 | | |||
102 | protected: | 104 | protected: | ||
105 | void itemChange(ItemChange change, const ItemChangeData &data) override; | ||||
103 | void releaseResources() override; | 106 | void releaseResources() override; | ||
104 | 107 | | |||
105 | private: | 108 | private: | ||
106 | void iconToTexture(WindowTextureNode *textureNode); | 109 | void iconToTexture(WindowTextureNode *textureNode); | ||
107 | void windowToTexture(WindowTextureNode *textureNode); | 110 | void windowToTexture(WindowTextureNode *textureNode); | ||
108 | void startRedirecting(); | 111 | bool startRedirecting(); | ||
109 | void stopRedirecting(); | 112 | void stopRedirecting(); | ||
110 | void resetDamaged(); | 113 | void resetDamaged(); | ||
111 | void setThumbnailAvailable(bool thumbnailAvailable); | 114 | void setThumbnailAvailable(bool thumbnailAvailable); | ||
115 | void sceneVisibilityChanged(bool visible); | ||||
112 | 116 | | |||
113 | bool m_xcb; | 117 | bool m_xcb; | ||
114 | bool m_composite; | 118 | bool m_composite; | ||
119 | QPointer<QWindow> m_scene; | ||||
115 | uint32_t m_winId; | 120 | uint32_t m_winId; | ||
116 | QSizeF m_paintedSize; | 121 | QSizeF m_paintedSize; | ||
117 | bool m_thumbnailAvailable; | 122 | bool m_thumbnailAvailable; | ||
123 | bool m_redirecting; | ||||
118 | bool m_damaged; | 124 | bool m_damaged; | ||
119 | int m_depth; | 125 | int m_depth; | ||
120 | #if HAVE_XCB_COMPOSITE | 126 | #if HAVE_XCB_COMPOSITE | ||
121 | xcb_pixmap_t pixmapForWindow(); | 127 | xcb_pixmap_t pixmapForWindow(); | ||
122 | bool m_openGLFunctionsResolved; | 128 | bool m_openGLFunctionsResolved; | ||
123 | uint8_t m_damageEventBase; | 129 | uint8_t m_damageEventBase; | ||
124 | xcb_damage_damage_t m_damage; | 130 | xcb_damage_damage_t m_damage; | ||
125 | xcb_pixmap_t m_pixmap; | 131 | xcb_pixmap_t m_pixmap; | ||
▲ Show 20 Lines • Show All 43 Lines • Show Last 20 Lines |