diff --git a/gtk3-revert-forced-xftdpi.patch b/gtk3-revert-forced-xftdpi.patch new file mode 100644 index 0000000..2452497 --- /dev/null +++ b/gtk3-revert-forced-xftdpi.patch @@ -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 + + 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); + } diff --git a/gtk3.changes b/gtk3.changes index f2d19cb..4d952f5 100644 --- a/gtk3.changes +++ b/gtk3.changes @@ -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 diff --git a/gtk3.spec b/gtk3.spec index 3cbeee7..164c245 100644 --- a/gtk3.spec +++ b/gtk3.spec @@ -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