Accepting request 535496 from GNOME:Factory

- Add gtk3-revert-forced-xftdpi.patch: revert upstream commit
  breaking DPI autodetection (boo#1022830, fate#322401, fdo#98909,
  kde#367499, bmo#1269274). Aligns GTK's DPI detection code back to
  what GTK2 does. (forwarded request 534968 from dimstar)

OBS-URL: https://build.opensuse.org/request/show/535496
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gtk3?expand=0&rev=119
This commit is contained in:
Dominique Leuenberger 2017-10-21 18:17:03 +00:00 committed by Git OBS Bridge
commit f47217cc6a
3 changed files with 40 additions and 0 deletions

View File

@ -0,0 +1,29 @@
From: Guiseppe Bilotta
Subject: Revert "Simplify Xft setting fallback"
References: boo#1022830 fate#322401 fdo#98909 kde#367499 bmo#1269274
This patch reverts part of commit bdf0820
("Simplify Xft setting fallback") which forces the DPI to 96
instead of querying the X server for the physical screen dimensions.
This is needed for GTK applications to autodetect the DPI of
monitors and not depend on manual configuration.
Signed-off-by: Fabian Vogt <fvogt@suse.com>
gdk/x11/gdkxftdefaults.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Index: gtk+-3.20.10/gdk/x11/gdkxftdefaults.c
===================================================================
--- gtk+-3.20.10.orig/gdk/x11/gdkxftdefaults.c
+++ gtk+-3.20.10/gdk/x11/gdkxftdefaults.c
@@ -174,7 +174,8 @@ init_xft_settings (GdkScreen *screen)
x11_screen->xft_rgba = FC_RGBA_UNKNOWN;
if (!get_double_default (xdisplay, "dpi", &dpi_double))
- dpi_double = 96.0;
+ dpi_double = (DisplayHeight(xdisplay, x11_screen->screen_num)*25.4)/
+ DisplayHeightMM(xdisplay, x11_screen->screen_num);
x11_screen->xft_dpi = (int)(0.5 + PANGO_SCALE * dpi_double);
}

View File

@ -97,6 +97,14 @@ Wed Jul 19 07:05:03 UTC 2017 - zaitor@opensuse.org
bgo#782040, bgo#782325, bgo#784323, bgo#784723, bgo#784888.
+ Updated translations.
-------------------------------------------------------------------
Thu Jul 6 07:05:48 UTC 2017 - fvogt@suse.com
- Add gtk3-revert-forced-xftdpi.patch: revert upstream commit
breaking DPI autodetection (boo#1022830, fate#322401, fdo#98909,
kde#367499, bmo#1269274). Aligns GTK's DPI detection code back to
what GTK2 does.
-------------------------------------------------------------------
Tue Jun 27 12:24:12 UTC 2017 - dimstar@opensuse.org

View File

@ -48,6 +48,8 @@ Patch1: gtk3-path-local.patch
Patch2: gtk3-silence-log-spew-blank-cursors.patch
# PATCH-FIX-OPENSUSE gtk3-restore-filechooser-click-behavior.patch bgo#758065 bsc#1057471 yfjiang@suse.com -- revert upstream commit#fb0a13b to restore the single click behavior
Patch3: gtk3-restore-filechooser-click-behavior.patch
# PATCH-FIX-OPENSUSE revert-forced-xftdpi.patch fvogt@opensuse.org -- Revert very controversal commit on GTK3, forcing DPI to 96
Patch4: gtk3-revert-forced-xftdpi.patch
BuildRequires: cups-devel >= 1.2
BuildRequires: docbook-xsl-stylesheets
BuildRequires: fdupes
@ -369,6 +371,7 @@ cp -a %{S:1} .
#patch1 -p0
%patch2 -p1
%patch3 -p1
%patch4 -p1
%build
# Disabled since patch 1 is in need of rebase