[arch-commits] Commit in gtk3/trunk (2 files)
Jan Steffens
heftig at archlinux.org
Mon Oct 10 15:46:09 UTC 2016
Date: Monday, October 10, 2016 @ 15:46:08
Author: heftig
Revision: 278176
3.22.1+8+ge11df6c-2
Added:
gtk3/trunk/0001-gdkscreen-x11-Fix-screen-and-monitor-size-calculatio.patch
Modified:
gtk3/trunk/PKGBUILD
-----------------------------------------------------------------+
0001-gdkscreen-x11-Fix-screen-and-monitor-size-calculatio.patch | 83 ++++++++++
PKGBUILD | 13 -
2 files changed, 91 insertions(+), 5 deletions(-)
Added: 0001-gdkscreen-x11-Fix-screen-and-monitor-size-calculatio.patch
===================================================================
--- 0001-gdkscreen-x11-Fix-screen-and-monitor-size-calculatio.patch (rev 0)
+++ 0001-gdkscreen-x11-Fix-screen-and-monitor-size-calculatio.patch 2016-10-10 15:46:08 UTC (rev 278176)
@@ -0,0 +1,83 @@
+From b4f90beaa96bb7ecf3e144f6d60b9fa9f3e9f582 Mon Sep 17 00:00:00 2001
+From: "Jan Alexander Steffens (heftig)" <jan.steffens at gmail.com>
+Date: Mon, 10 Oct 2016 16:34:28 +0200
+Subject: [PATCH] gdkscreen-x11: Fix screen and monitor size calculation
+
+The monitors are already in scaled pixels, so scaling again when retrieving
+the screen size is wrong.
+
+With GDK_SCALE unset, the initial monitor sizes are unscaled, and when the
+xsettings client sets a scale > 1, the monitor sizes should be updated.
+
+The end result is that the monitor sizes start out wrong, and get
+corrected on the first xrandr event, while the screen size starts out
+right and becomes wrong after the event.
+
+This patch fixes Firefox misplacing menus and popovers when the xrandr
+configuration changes while it is running.
+
+Fix for the X11 side of
+
+https://bugzilla.gnome.org/show_bug.cgi?id=772202
+---
+ gdk/x11/gdkscreen-x11.c | 16 ++++------------
+ 1 file changed, 4 insertions(+), 12 deletions(-)
+
+diff --git a/gdk/x11/gdkscreen-x11.c b/gdk/x11/gdkscreen-x11.c
+index 450872d99df56b79..1852a7dea2ad18e4 100644
+--- a/gdk/x11/gdkscreen-x11.c
++++ b/gdk/x11/gdkscreen-x11.c
+@@ -49,6 +49,7 @@
+ static void gdk_x11_screen_dispose (GObject *object);
+ static void gdk_x11_screen_finalize (GObject *object);
+ static void init_randr_support (GdkScreen *screen);
++static void process_monitors_change (GdkScreen *screen);
+
+ enum
+ {
+@@ -82,13 +83,13 @@ gdk_x11_screen_get_display (GdkScreen *screen)
+ static gint
+ gdk_x11_screen_get_width (GdkScreen *screen)
+ {
+- return GDK_X11_SCREEN (screen)->width / GDK_X11_SCREEN (screen)->window_scale;
++ return GDK_X11_SCREEN (screen)->width;
+ }
+
+ static gint
+ gdk_x11_screen_get_height (GdkScreen *screen)
+ {
+- return GDK_X11_SCREEN (screen)->height / GDK_X11_SCREEN (screen)->window_scale;
++ return GDK_X11_SCREEN (screen)->height;
+ }
+
+ static gint
+@@ -906,10 +907,8 @@ void
+ _gdk_x11_screen_set_window_scale (GdkX11Screen *x11_screen,
+ gint scale)
+ {
+- GdkX11Display *x11_display = GDK_X11_DISPLAY (x11_screen->display);
+ GList *toplevels, *l;
+ GdkWindow *root;
+- int i;
+
+ if (x11_screen->window_scale == scale)
+ return;
+@@ -928,14 +927,7 @@ _gdk_x11_screen_set_window_scale (GdkX11Screen *x11_screen,
+ _gdk_x11_window_set_window_scale (window, scale);
+ }
+
+- for (i = 0; i < x11_display->monitors->len; i++)
+- {
+- GdkMonitor *monitor = GDK_MONITOR (x11_display->monitors->pdata[i]);
+-
+- gdk_monitor_set_scale_factor (monitor, scale);
+- }
+-
+- g_signal_emit_by_name (GDK_SCREEN (x11_screen), "monitors-changed");
++ process_monitors_change (GDK_SCREEN (x11_screen));
+ }
+
+ /*
+--
+2.10.0
+
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2016-10-10 15:32:56 UTC (rev 278175)
+++ PKGBUILD 2016-10-10 15:46:08 UTC (rev 278176)
@@ -4,8 +4,8 @@
pkgbase=gtk3
pkgname=(gtk3 gtk-update-icon-cache gtk3-print-backends)
-pkgver=3.22.1
-pkgrel=1
+pkgver=3.22.1+8+ge11df6c
+pkgrel=2
pkgdesc="GObject-based multi-platform GUI toolkit"
arch=(i686 x86_64)
url="http://www.gtk.org/"
@@ -14,13 +14,15 @@
adwaita-icon-theme json-glib librsvg wayland-protocols desktop-file-utils mesa)
makedepends=(gobject-introspection libcanberra gtk-doc git colord rest libcups)
license=(LGPL)
-_commit=ae7a1e0d08a19184b659ca38623431b210d0f84a # tags/3.22.1^0
+_commit=e11df6cca0c400f964d815bbe575cf04cc178a7c # gtk-3-22
source=("git://git.gnome.org/gtk+#commit=$_commit"
+ 0001-gdkscreen-x11-Fix-screen-and-monitor-size-calculatio.patch
settings.ini
gtk-query-immodules-3.0.hook
gtk-update-icon-cache.hook
gtk-update-icon-cache.script)
sha256sums=('SKIP'
+ '209fbfaa4b83daf5c249a1cb1a6762d607f6d63034e80e2324f2fb3586a4f348'
'01fc1d81dc82c4a052ac6e25bf9a04e7647267cc3017bc91f9ce3e63e5eb9202'
'de46e5514ff39a7a65e01e485e874775ab1c0ad20b8e94ada43f4a6af1370845'
'496064a9dd6214bd58f689dd817dbdc4d7f17d42a8c9940a87018c3f829ce308'
@@ -27,13 +29,14 @@
'f1d3a0dbfd82f7339301abecdbe5f024337919b48bd0e09296bb0e79863b2541')
pkgver() {
- cd gtk+
- git describe --tags | sed 's/-/+/g'
+ cd gtk+
+ git describe --tags | sed 's/-/+/g'
}
prepare() {
mkdir print-backends
cd gtk+
+ patch -Np1 -i ../0001-gdkscreen-x11-Fix-screen-and-monitor-size-calculatio.patch
NOCONFIGURE=1 ./autogen.sh
}
More information about the arch-commits
mailing list