[mate-power-manager] 01/02: debian/patches: Add 0001_dont-crash-if-XRRGetScreenResourceCurrent-fails.patch (picked from upstream). Don't crash if XRandR 1.3 is not supported.

Mike Gabriel sunweaver at debian.org
Sat Jan 2 07:26:09 UTC 2016


This is an automated email from the git hooks/post-receive script.

sunweaver pushed a commit to branch master
in repository mate-power-manager.

commit df831ee6bd8608128654ea0a393a92dcddcfb526
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Sat Jan 2 08:10:50 2016 +0100

    debian/patches: Add 0001_dont-crash-if-XRRGetScreenResourceCurrent-fails.patch (picked from upstream). Don't crash if XRandR 1.3 is not supported.
---
 ...rash-if-XRRGetScreenResourceCurrent-fails.patch | 24 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 25 insertions(+)

diff --git a/debian/patches/0001_dont-crash-if-XRRGetScreenResourceCurrent-fails.patch b/debian/patches/0001_dont-crash-if-XRRGetScreenResourceCurrent-fails.patch
new file mode 100644
index 0000000..4eeaf21
--- /dev/null
+++ b/debian/patches/0001_dont-crash-if-XRRGetScreenResourceCurrent-fails.patch
@@ -0,0 +1,24 @@
+From df94b62685f640c4e1854eec5736e01f812a2d66 Mon Sep 17 00:00:00 2001
+From: monsta <monsta at inbox.ru>
+Date: Tue, 15 Dec 2015 16:48:47 +0300
+Subject: [PATCH] don't crash when XRRGetScreenResourcesCurrent fails
+
+---
+ src/gpm-brightness.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+--- a/src/gpm-brightness.c
++++ b/src/gpm-brightness.c
+@@ -846,7 +846,12 @@
+ 		}
+ 
+ 		root = RootWindow (brightness->priv->dpy, screen);
++
++		gdk_error_trap_push ();
+ 		resource = XRRGetScreenResourcesCurrent (brightness->priv->dpy, root);
++		if (gdk_error_trap_pop () || resource == NULL) {
++			egg_warning ("failed to XRRGetScreenResourcesCurrent");
++		}
+ 
+ 		if (resource != NULL) {
+ 			egg_debug ("adding resource %p", resource);
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..9c65931
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001_dont-crash-if-XRRGetScreenResourceCurrent-fails.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mate/mate-power-manager.git



More information about the pkg-mate-commits mailing list