summaryrefslogtreecommitdiffstats
path: root/src/client/qwaylanddisplay_p.h
diff options
context:
space:
mode:
authorDavid Edmundson <davidedmundson@kde.org>2022-03-23 15:35:50 +0000
committerDavid Edmundson <davidedmundson@kde.org>2022-12-07 20:36:40 +0000
commit23d3fc712cdf7fc0a4ff837082de9ba773e8605c (patch)
tree5b4866d8c3c0b7eb524a8f70050b3c2868b6ba01 /src/client/qwaylanddisplay_p.h
parent5bae5debdf94f6bbec61f4ff50ecbf3c1231e0e3 (diff)
Implement fractional_scale_v1 and wp_viewport
This allows compositors to hint a non-integer scale to use on a window which we can hook to Qt's existing fractional scaling support. The viewport is used to communicate the relationship between buffer size and logical size to the compositor. It is a non-integer alternative to wl_buffer_scale Change-Id: I1a850f1bcd40e8d04e241e18a538b11f18bc671c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: David Edmundson <davidedmundson@kde.org>
Diffstat (limited to 'src/client/qwaylanddisplay_p.h')
-rw-r--r--src/client/qwaylanddisplay_p.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/client/qwaylanddisplay_p.h b/src/client/qwaylanddisplay_p.h
index 473016f1e..640f33b8e 100644
--- a/src/client/qwaylanddisplay_p.h
+++ b/src/client/qwaylanddisplay_p.h
@@ -36,6 +36,7 @@
#endif
struct wl_cursor_image;
+struct wp_viewport;
QT_BEGIN_NAMESPACE
@@ -50,6 +51,8 @@ namespace QtWayland {
class zwp_text_input_manager_v2;
class zwp_text_input_manager_v4;
class qt_text_input_method_manager_v1;
+ class wp_viewporter;
+ class wp_fractional_scale_manager_v1;
}
namespace QtWaylandClient {
@@ -110,6 +113,7 @@ public:
struct wl_surface *createSurface(void *handle);
struct ::wl_region *createRegion(const QRegion &qregion);
struct ::wl_subsurface *createSubSurface(QWaylandWindow *window, QWaylandWindow *parent);
+ struct ::wp_viewport *createViewport(QWaylandWindow *window);
QWaylandShellIntegration *shellIntegration() const;
QWaylandClientBufferIntegration *clientBufferIntegration() const;
@@ -146,6 +150,8 @@ public:
QtWayland::zwp_text_input_manager_v4 *textInputManagerv4() const { return mTextInputManagerv4.data(); }
QWaylandHardwareIntegration *hardwareIntegration() const { return mHardwareIntegration.data(); }
QWaylandXdgOutputManagerV1 *xdgOutputManager() const { return mXdgOutputManager.data(); }
+ QtWayland::wp_fractional_scale_manager_v1 *fractionalScaleManager() const { return mFractionalScaleManager.data(); }
+ QtWayland::wp_viewporter *viewporter() const { return mViewporter.data(); }
struct RegistryGlobal {
uint32_t id;
@@ -265,6 +271,8 @@ private:
QScopedPointer<QtWayland::zwp_text_input_manager_v4> mTextInputManagerv4;
QScopedPointer<QWaylandHardwareIntegration> mHardwareIntegration;
QScopedPointer<QWaylandXdgOutputManagerV1> mXdgOutputManager;
+ QScopedPointer<QtWayland::wp_viewporter> mViewporter;
+ QScopedPointer<QtWayland::wp_fractional_scale_manager_v1> mFractionalScaleManager;
int mFd = -1;
int mWritableNotificationFd = -1;
QList<RegistryGlobal> mGlobals;