[gnome-shell/f20] Replace patch with one that does not hang gdm
drago01
drago01 at fedoraproject.org
Wed Feb 12 21:33:24 UTC 2014
commit ab1f69bfac789cc5b74f727000b6747d9a85ad20
Author: Adel Gadllah <adel.gadllah at gmail.com>
Date: Wed Feb 12 22:33:48 2014 +0100
Replace patch with one that does not hang gdm
0001-layout-Set-high-dpi-scaling-factor.patch | 49 +++++++++++++++++++++++++
gnome-shell.spec | 9 +++--
2 files changed, 55 insertions(+), 3 deletions(-)
---
diff --git a/0001-layout-Set-high-dpi-scaling-factor.patch b/0001-layout-Set-high-dpi-scaling-factor.patch
new file mode 100644
index 0000000..2d3fc33
--- /dev/null
+++ b/0001-layout-Set-high-dpi-scaling-factor.patch
@@ -0,0 +1,49 @@
+From 3864581d8f3616aa4ce400b41843e48ffbb7fd47 Mon Sep 17 00:00:00 2001
+From: Adel Gadllah <adel.gadllah at gmail.com>
+Date: Wed, 12 Feb 2014 17:40:01 +0100
+Subject: [PATCH] layout: Set high dpi scaling factor
+
+Set the scaling factor when the dpi is above the hidpi threshold.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=705410
+---
+ js/ui/layout.js | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+diff --git a/js/ui/layout.js b/js/ui/layout.js
+index 6f7bceb..b636971 100644
+--- a/js/ui/layout.js
++++ b/js/ui/layout.js
+@@ -31,6 +31,9 @@ const MESSAGE_TRAY_PRESSURE_TIMEOUT = 1000; // ms
+ const HOT_CORNER_PRESSURE_THRESHOLD = 100; // pixels
+ const HOT_CORNER_PRESSURE_TIMEOUT = 1000; // ms
+
++// We scale up when the dpi is higher then this (same value used by gsd)
++const HIGH_DPI_LIMIT = 192;
++
+ function isPopupMetaWindow(actor) {
+ switch(actor.meta_window.get_window_type()) {
+ case Meta.WindowType.DROPDOWN_MENU:
+@@ -486,8 +489,19 @@ const LayoutManager = new Lang.Class({
+ return false;
+ },
+
++ _updateScaling: function() {
++ let primary = this.monitors[this.primaryIndex];
++ let dpi_x = primary.width / (global.gdk_screen.get_monitor_width_mm(this.primaryIndex) / 25.4);
++ let dpi_y = primary.height / (global.gdk_screen.get_monitor_height_mm(this.primaryIndex) / 25.4);
++ if (dpi_x > HIGH_DPI_LIMIT && dpi_y > HIGH_DPI_LIMIT)
++ St.ThemeContext.get_for_stage(global.stage).scale_factor = 2;
++ else
++ St.ThemeContext.get_for_stage(global.stage).scale_factor = 1;
++ },
++
+ _monitorsChanged: function() {
+ this._updateMonitors();
++ this._updateScaling();
+ this._updateBoxes();
+ this._updateTrayBarrier();
+ this._updateHotCorners();
+--
+1.8.5.3
+
diff --git a/gnome-shell.spec b/gnome-shell.spec
index a079e92..c01186f 100644
--- a/gnome-shell.spec
+++ b/gnome-shell.spec
@@ -1,6 +1,6 @@
Name: gnome-shell
Version: 3.10.3
-Release: 5%{?dist}
+Release: 6%{?dist}
Summary: Window management and application launching for GNOME
Group: User Interface/Desktops
@@ -18,7 +18,7 @@ Patch11: track-skip-taskbar-changes.patch
Patch12: 0001-window-tracker-Be-more-cautious-when-setting-focus-a.patch
Patch13: 0001-shell-app-Don-t-crash-when-trying-to-dispose.patch
Patch14: 0001-st-Add-high-dpi-support.patch
-Patch15: 0002-shell-global-Set-high-dpi-scaling-factor.patch
+Patch15: 0001-layout-Set-high-dpi-scaling-factor.patch
%define clutter_version 1.13.4
%define gnome_bluetooth_version 1:3.9.0
@@ -128,7 +128,7 @@ easy to use experience.
%patch12 -p1 -b .fix-app-menu
%patch13 -p1 -b .fix-app-dispose-crash
%patch14 -p1 -b .hdpi-st
-%patch15 -p1 -b .hdpi-core
+%patch15 -p1 -b .hdpi-layout
%build
(if ! test -x configure; then NOCONFIGURE=1 ./autogen.sh; fi;
@@ -188,6 +188,9 @@ glib-compile-schemas --allow-any-name %{_datadir}/glib-2.0/schemas &> /dev/null
%exclude %{_datadir}/gtk-doc
%changelog
+* Wed Feb 12 2014 Adel Gadllah <adel.gadllah at gmail.com> - 3.10.4-6
+- Replace patch with one that does not hang gdm
+
* Wed Feb 12 2014 Adel Gadllah <adel.gadllah at gmail.com> - 3.10.4-5
- Backport high dpi support patches from upstream
More information about the scm-commits
mailing list