fix rhbz (#1517547)
This commit is contained in:
parent
968827043f
commit
bdfa50889d
@ -15,7 +15,7 @@
|
||||
Name: mate-settings-daemon
|
||||
Version: %{branch}.0
|
||||
%if 0%{?rel_build}
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
%else
|
||||
Release: 0.5%{?git_rel}%{?dist}
|
||||
%endif
|
||||
@ -30,7 +30,10 @@ URL: http://mate-desktop.org
|
||||
%{!?rel_build:Source0: http://git.mate-desktop.org/%{name}/snapshot/%{name}-%{commit}.tar.xz#/%{git_tar}}
|
||||
|
||||
# fix rhbz (#1140329)
|
||||
Patch0: mate-settings-daemon_fix-xrdb-plugin-for-rhel.patch
|
||||
Patch1: mate-settings-daemon_fix-xrdb-plugin-for-rhel.patch
|
||||
# https://github.com/mate-desktop/mate-settings-daemon/pull/199
|
||||
# rhbz (#1517547)
|
||||
Patch2: mate-settings-daemon_0001-Fix-big-fonts-by-default-with-org.mate.desktop.font-.patch
|
||||
|
||||
BuildRequires: dbus-glib-devel
|
||||
BuildRequires: dconf-devel
|
||||
@ -70,8 +73,9 @@ under it.
|
||||
%setup -q%{!?rel_build:n %{name}-%{commit}}
|
||||
|
||||
%if 0%{?rhel}
|
||||
%patch0 -p1 -b .xrdb
|
||||
%patch1 -p1 -b .xrdb
|
||||
%endif
|
||||
%patch2 -p1 -b .0001
|
||||
|
||||
%if 0%{?rel_build}
|
||||
#NOCONFIGURE=1 ./autogen.sh
|
||||
@ -148,6 +152,9 @@ fi
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Nov 29 2017 Wolfgang Ulbrich <chat-to-me@raveit.de> - 1.19.0-2
|
||||
- fix rhbz (#1517547)
|
||||
|
||||
* Thu Aug 17 2017 Wolfgang Ulbrich <chat-to-me@raveit.de> - 1.19.0-1
|
||||
- update to 1.19.0 release
|
||||
|
||||
|
@ -0,0 +1,95 @@
|
||||
From 788babedafaf59d8b7a36cb0ef3b0b1f0e5f732c Mon Sep 17 00:00:00 2001
|
||||
From: Pablo Barciela <scow@riseup.net>
|
||||
Date: Sat, 2 Dec 2017 01:15:07 +0100
|
||||
Subject: [PATCH] Fix: big fonts by default with
|
||||
"org.mate.desktop.font-rendering.dpi"
|
||||
|
||||
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1517547
|
||||
---
|
||||
.../a11y-keyboard/msd-a11y-preferences-dialog.c | 27 +++++-----------------
|
||||
plugins/xsettings/msd-xsettings-manager.c | 24 ++++---------------
|
||||
2 files changed, 11 insertions(+), 40 deletions(-)
|
||||
|
||||
diff --git a/plugins/a11y-keyboard/msd-a11y-preferences-dialog.c b/plugins/a11y-keyboard/msd-a11y-preferences-dialog.c
|
||||
index 2dedd56..165d5b0 100644
|
||||
--- a/plugins/a11y-keyboard/msd-a11y-preferences-dialog.c
|
||||
+++ b/plugins/a11y-keyboard/msd-a11y-preferences-dialog.c
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <glib/gi18n.h>
|
||||
#include <glib-object.h>
|
||||
#include <gtk/gtk.h>
|
||||
+#include <gdk/gdkx.h>
|
||||
|
||||
#include <dbus/dbus-glib.h>
|
||||
|
||||
@@ -177,27 +178,11 @@ get_dpi_from_x_server (void)
|
||||
if (screen != NULL) {
|
||||
double width_dpi;
|
||||
double height_dpi;
|
||||
- gint sc_width;
|
||||
- gint sc_height;
|
||||
-#if GTK_CHECK_VERSION (3, 22, 0)
|
||||
- GdkDisplay *display;
|
||||
- GdkMonitor *monitor;
|
||||
-
|
||||
-
|
||||
- display = gdk_screen_get_display (screen);
|
||||
- monitor = gdk_display_get_primary_monitor (display);
|
||||
-#endif
|
||||
-
|
||||
- gdk_window_get_geometry (gdk_screen_get_root_window (screen), NULL, NULL,
|
||||
- &sc_width, &sc_height);
|
||||
-
|
||||
-#if GTK_CHECK_VERSION (3, 22, 0)
|
||||
- width_dpi = dpi_from_pixels_and_mm (sc_width, gdk_monitor_get_width_mm (monitor));
|
||||
- height_dpi = dpi_from_pixels_and_mm (sc_height, gdk_monitor_get_height_mm (monitor));
|
||||
-#else
|
||||
- width_dpi = dpi_from_pixels_and_mm (sc_width, gdk_screen_get_width_mm (screen));
|
||||
- height_dpi = dpi_from_pixels_and_mm (sc_height, gdk_screen_get_height_mm (screen));
|
||||
-#endif
|
||||
+
|
||||
+ Screen *xscreen = gdk_x11_screen_get_xscreen (screen);
|
||||
+
|
||||
+ width_dpi = dpi_from_pixels_and_mm (WidthOfScreen (xscreen), WidthMMOfScreen (xscreen));
|
||||
+ height_dpi = dpi_from_pixels_and_mm (HeightOfScreen (xscreen), HeightMMOfScreen (xscreen));
|
||||
|
||||
if (width_dpi < DPI_LOW_REASONABLE_VALUE
|
||||
|| width_dpi > DPI_HIGH_REASONABLE_VALUE
|
||||
diff --git a/plugins/xsettings/msd-xsettings-manager.c b/plugins/xsettings/msd-xsettings-manager.c
|
||||
index a548dd4..a9635a8 100644
|
||||
--- a/plugins/xsettings/msd-xsettings-manager.c
|
||||
+++ b/plugins/xsettings/msd-xsettings-manager.c
|
||||
@@ -237,25 +237,11 @@ get_dpi_from_x_server (void)
|
||||
screen = gdk_screen_get_default ();
|
||||
if (screen != NULL) {
|
||||
double width_dpi, height_dpi;
|
||||
- gint sc_width, sc_height;
|
||||
-#if GTK_CHECK_VERSION (3, 22, 0)
|
||||
- GdkDisplay *display;
|
||||
- GdkMonitor *monitor;
|
||||
-
|
||||
- display = gdk_screen_get_display (screen);
|
||||
- monitor = gdk_display_get_primary_monitor (display);
|
||||
-#endif
|
||||
-
|
||||
- gdk_window_get_geometry (gdk_screen_get_root_window (screen), NULL, NULL,
|
||||
- &sc_width, &sc_height);
|
||||
-
|
||||
-#if GTK_CHECK_VERSION (3, 22, 0)
|
||||
- width_dpi = dpi_from_pixels_and_mm (sc_width, gdk_monitor_get_width_mm (monitor));
|
||||
- height_dpi = dpi_from_pixels_and_mm (sc_height, gdk_monitor_get_height_mm (monitor));
|
||||
-#else
|
||||
- width_dpi = dpi_from_pixels_and_mm (sc_width, gdk_screen_get_width_mm (screen));
|
||||
- height_dpi = dpi_from_pixels_and_mm (sc_height, gdk_screen_get_height_mm (screen));
|
||||
-#endif
|
||||
+
|
||||
+ Screen *xscreen = gdk_x11_screen_get_xscreen (screen);
|
||||
+
|
||||
+ width_dpi = dpi_from_pixels_and_mm (WidthOfScreen (xscreen), WidthMMOfScreen (xscreen));
|
||||
+ height_dpi = dpi_from_pixels_and_mm (HeightOfScreen (xscreen), HeightMMOfScreen (xscreen));
|
||||
|
||||
if (width_dpi < DPI_LOW_REASONABLE_VALUE || width_dpi > DPI_HIGH_REASONABLE_VALUE
|
||||
|| height_dpi < DPI_LOW_REASONABLE_VALUE || height_dpi > DPI_HIGH_REASONABLE_VALUE) {
|
||||
--
|
||||
2.13.6
|
||||
|
Loading…
Reference in New Issue
Block a user