From b71b2c4f2a28f3bc2afc16fdd4b433d034da7ab8 Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Fri, 17 Nov 2017 11:51:47 +0100 Subject: [PATCH] QGtkScreen: Disable DPR workaround for newer GTK+ versions This fixes Telegram Desktop's image overlays in Fedora 27, probably Creator menu positioning, and a lot of other things --- src/qgtkscreen.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qgtkscreen.cpp b/src/qgtkscreen.cpp index dcfe83c..b682152 100644 --- a/src/qgtkscreen.cpp +++ b/src/qgtkscreen.cpp @@ -47,8 +47,8 @@ QGtkScreen::QGtkScreen(GdkMonitor *monitor) QRect QGtkScreen::availableGeometry() const { qreal dpr = 1.0; +#if defined(GDK_WINDOWING_WAYLAND) && !GTK_CHECK_VERSION(3, 22, 25) GdkDisplay *dpy = gdk_display_get_default(); -#ifdef GDK_WINDOWING_WAYLAND // Workaround for https://bugzilla.gnome.org/show_bug.cgi?id=788497 if (GDK_IS_WAYLAND_DISPLAY(dpy)) { dpr = devicePixelRatio(); @@ -62,8 +62,8 @@ QRect QGtkScreen::availableGeometry() const QRect QGtkScreen::geometry() const { qreal dpr = 1.0; +#if defined(GDK_WINDOWING_WAYLAND) && !GTK_CHECK_VERSION(3, 22, 25) GdkDisplay *dpy = gdk_display_get_default(); -#ifdef GDK_WINDOWING_WAYLAND // Workaround for https://bugzilla.gnome.org/show_bug.cgi?id=788497 if (GDK_IS_WAYLAND_DISPLAY(dpy)) { dpr = devicePixelRatio();