Gentoo Archives: gentoo-commits

From: "Gilles Dartiguelongue (eva)" <eva@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in gnome-base/gnome-panel/files: gnome-panel-2.28.0-crashes-xrandr.patch gnome-panel-2.28.0-clock-applet-missing-cflags.patch
Date: Mon, 02 Nov 2009 21:52:52
Message-Id: E1N54p5-0005ik-KR@stork.gentoo.org
1 eva 09/11/02 21:52:23
2
3 Added: gnome-panel-2.28.0-crashes-xrandr.patch
4 gnome-panel-2.28.0-clock-applet-missing-cflags.patch
5 Log:
6 New version for GNOME 2.28.
7 (Portage version: 2.2_rc48/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.1 gnome-base/gnome-panel/files/gnome-panel-2.28.0-crashes-xrandr.patch
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/gnome-base/gnome-panel/files/gnome-panel-2.28.0-crashes-xrandr.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/gnome-base/gnome-panel/files/gnome-panel-2.28.0-crashes-xrandr.patch?rev=1.1&content-type=text/plain
14
15 Index: gnome-panel-2.28.0-crashes-xrandr.patch
16 ===================================================================
17 From 66b8e290bd0b767183cba583917907940b5b425a Mon Sep 17 00:00:00 2001
18 From: Vincent Untz <vuntz@×××××.org>
19 Date: Tue, 06 Oct 2009 10:47:52 +0000
20 Subject: [panel] Fix crashes in various conditions with the new randr code
21
22 If nothing had probed the randr screen resources before us and the X
23 server is supporting randr 1.3, then we got no output, and therefore no
24 monitor. The fix here is to actively probe for resources if we detect
25 this case. See https://bugzilla.gnome.org/show_bug.cgi?id=597101
26
27 Also, in some cases, all outputs appear disconnected. See
28 https://bugzilla.novell.com/show_bug.cgi?id=543876
29
30 To be completely on the safe side, if we get no monitor information from
31 randr, even if it is successful, we fallback to the GTK+ method.
32 ---
33 diff --git a/gnome-panel/panel-multiscreen.c b/gnome-panel/panel-multiscreen.c
34 index 8a05221..4ed76ae 100644
35 --- a/gnome-panel/panel-multiscreen.c
36 +++ b/gnome-panel/panel-multiscreen.c
37 @@ -136,9 +136,17 @@ panel_multiscreen_get_randr_monitors_for_screen (GdkScreen *screen,
38 xroot = GDK_WINDOW_XWINDOW (gdk_screen_get_root_window (screen));
39
40 #if (RANDR_MAJOR > 1 || (RANDR_MAJOR == 1 && RANDR_MINOR >= 3))
41 - if (have_randr_1_3)
42 + if (have_randr_1_3) {
43 resources = XRRGetScreenResourcesCurrent (xdisplay, xroot);
44 - else
45 + if (resources->noutput == 0) {
46 + /* This might happen if nothing tried to get randr
47 + * resources from the server before, so we need an
48 + * active probe. See comment #27 in
49 + * https://bugzilla.gnome.org/show_bug.cgi?id=597101 */
50 + XRRFreeScreenResources (resources);
51 + resources = XRRGetScreenResources (xdisplay, xroot);
52 + }
53 + } else
54 resources = XRRGetScreenResources (xdisplay, xroot);
55 #else
56 resources = XRRGetScreenResources (xdisplay, xroot);
57 @@ -205,6 +213,17 @@ panel_multiscreen_get_randr_monitors_for_screen (GdkScreen *screen,
58 return FALSE;
59 }
60
61 + if (geometries->len == 0) {
62 + /* This can happen in at least one case:
63 + * https://bugzilla.novell.com/show_bug.cgi?id=543876 where all
64 + * monitors appear disconnected (possibly because the screen
65 + * is behing a KVM switch) -- see comment #8.
66 + * There might be other cases too, so we stay on the safe side.
67 + */
68 + g_array_free (geometries, TRUE);
69 + return FALSE;
70 + }
71 +
72 *monitors_ret = geometries->len;
73 *geometries_ret = (GdkRectangle *) g_array_free (geometries, FALSE);
74
75 @@ -238,9 +257,15 @@ panel_multiscreen_get_raw_monitors_for_screen (GdkScreen *screen,
76 int *monitors_ret,
77 GdkRectangle **geometries_ret)
78 {
79 - if (panel_multiscreen_get_randr_monitors_for_screen (screen,
80 - monitors_ret,
81 - geometries_ret))
82 + gboolean res;
83 +
84 + *monitors_ret = 0;
85 + *geometries_ret = NULL;
86 +
87 + res = panel_multiscreen_get_randr_monitors_for_screen (screen,
88 + monitors_ret,
89 + geometries_ret);
90 + if (res && *monitors_ret > 0)
91 return;
92
93 panel_multiscreen_get_gdk_monitors_for_screen (screen,
94 --
95 cgit v0.8.2
96
97
98
99 1.1 gnome-base/gnome-panel/files/gnome-panel-2.28.0-clock-applet-missing-cflags.patch
100
101 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/gnome-base/gnome-panel/files/gnome-panel-2.28.0-clock-applet-missing-cflags.patch?rev=1.1&view=markup
102 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/gnome-base/gnome-panel/files/gnome-panel-2.28.0-clock-applet-missing-cflags.patch?rev=1.1&content-type=text/plain
103
104 Index: gnome-panel-2.28.0-clock-applet-missing-cflags.patch
105 ===================================================================
106 From a2cb0e91f58b22832f4efc51acf1d1dd3efb6969 Mon Sep 17 00:00:00 2001
107 From: Maxim Britov <maxim@××××××××××××.by>
108 Date: Tue, 6 Oct 2009 19:16:51 +0200
109 Subject: [PATCH] Fix missing $(PANEL_CFLAGS) for clock applet
110
111 ---
112 applets/clock/Makefile.am | 1 +
113 1 files changed, 1 insertions(+), 0 deletions(-)
114
115 diff --git a/applets/clock/Makefile.am b/applets/clock/Makefile.am
116 index da5e0d9..a9b95f9 100644
117 --- a/applets/clock/Makefile.am
118 +++ b/applets/clock/Makefile.am
119 @@ -8,6 +8,7 @@ INCLUDES = \
120 $(WARN_CFLAGS) \
121 $(CLOCK_CFLAGS) \
122 $(POLKIT_CFLAGS) \
123 + $(PANEL_CFLAGS) \
124 $(LIBPANEL_APPLET_CFLAGS) \
125 -DDATADIR=\""$(datadir)"\" \
126 -DBUILDERDIR=\""$(uidir)"\" \
127 --
128 1.6.5.rc2