summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Müller <schnitzeltony@googlemail.com>2014-05-07 21:39:14 +0200
committerMartin Jansa <Martin.Jansa@gmail.com>2014-05-09 14:58:00 +0200
commit5bad3dcf1221656cfae3ada1a43a3de195f4fd42 (patch)
treeec67adab7088277aae82487e0e451146b1f95673
parent589844d0debace14f86258c98a6665f6a18c02ae (diff)
downloadmeta-openembedded-5bad3dcf1221656cfae3ada1a43a3de195f4fd42.tar.gz
xfce4-settings: fix crash when no pointer device is connected
* reported by Cristian Prigoana * updated [1] [1] https://bugzilla.xfce.org/show_bug.cgi?id=9474 Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-rw-r--r--meta-xfce/recipes-xfce/xfce4-settings/xfce4-settings/touchscreen/0005-pointers-detect-a-change-of-pointer-device-used-and-.patch27
1 files changed, 15 insertions, 12 deletions
diff --git a/meta-xfce/recipes-xfce/xfce4-settings/xfce4-settings/touchscreen/0005-pointers-detect-a-change-of-pointer-device-used-and-.patch b/meta-xfce/recipes-xfce/xfce4-settings/xfce4-settings/touchscreen/0005-pointers-detect-a-change-of-pointer-device-used-and-.patch
index f4c28397d..3c9b3dad9 100644
--- a/meta-xfce/recipes-xfce/xfce4-settings/xfce4-settings/touchscreen/0005-pointers-detect-a-change-of-pointer-device-used-and-.patch
+++ b/meta-xfce/recipes-xfce/xfce4-settings/xfce4-settings/touchscreen/0005-pointers-detect-a-change-of-pointer-device-used-and-.patch
@@ -1,4 +1,4 @@
1From 37f5e33511499d320c3035c5377425004657faa5 Mon Sep 17 00:00:00 2001 1From 78353322ce1070ee1fd7bb5367e2c4dd43928f42 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com> 2From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
3Date: Thu, 20 Dec 2012 16:58:19 +0100 3Date: Thu, 20 Dec 2012 16:58:19 +0100
4Subject: [PATCH 5/5] pointers: detect a change of pointer-device used and set 4Subject: [PATCH 5/5] pointers: detect a change of pointer-device used and set
@@ -17,11 +17,11 @@ Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
17Upstream-Status: Submitted [1] 17Upstream-Status: Submitted [1]
18[1] https://bugzilla.xfce.org/show_bug.cgi?id=9474 18[1] https://bugzilla.xfce.org/show_bug.cgi?id=9474
19--- 19---
20 xfsettingsd/pointers.c | 337 +++++++++++++++++++++++++++++++---------------- 20 xfsettingsd/pointers.c | 342 ++++++++++++++++++++++++++++++++-----------------
21 1 files changed, 222 insertions(+), 115 deletions(-) 21 1 file changed, 225 insertions(+), 117 deletions(-)
22 22
23diff --git a/xfsettingsd/pointers.c b/xfsettingsd/pointers.c 23diff --git a/xfsettingsd/pointers.c b/xfsettingsd/pointers.c
24index 62ebc60..32662cc 100644 24index cfa56e2..41c8bba 100644
25--- a/xfsettingsd/pointers.c 25--- a/xfsettingsd/pointers.c
26+++ b/xfsettingsd/pointers.c 26+++ b/xfsettingsd/pointers.c
27@@ -66,11 +66,9 @@ static void xfce_pointers_helper_channel_property_changed (XfconfCha 27@@ -66,11 +66,9 @@ static void xfce_pointers_helper_channel_property_changed (XfconfCha
@@ -166,7 +166,7 @@ index 62ebc60..32662cc 100644
166 166
167 /* only stop a running daemon */ 167 /* only stop a running daemon */
168 if (!xfconf_channel_get_bool (helper->channel, "/DisableTouchpadWhileTyping", FALSE)) 168 if (!xfconf_channel_get_bool (helper->channel, "/DisableTouchpadWhileTyping", FALSE))
169@@ -297,17 +325,16 @@ xfce_pointers_helper_syndaemon_check (XfcePointersHelper *helper) 169@@ -299,17 +327,16 @@ xfce_pointers_helper_syndaemon_check (XfcePointersHelper *helper)
170 if (device_list[n].type != touchpad_type) 170 if (device_list[n].type != touchpad_type)
171 continue; 171 continue;
172 172
@@ -188,7 +188,7 @@ index 62ebc60..32662cc 100644
188 if (gdk_error_trap_pop () == 0 188 if (gdk_error_trap_pop () == 0
189 && props != NULL) 189 && props != NULL)
190 { 190 {
191@@ -317,8 +344,6 @@ xfce_pointers_helper_syndaemon_check (XfcePointersHelper *helper) 191@@ -319,8 +346,6 @@ xfce_pointers_helper_syndaemon_check (XfcePointersHelper *helper)
192 XFree (props); 192 XFree (props);
193 } 193 }
194 194
@@ -197,7 +197,7 @@ index 62ebc60..32662cc 100644
197 if (have_synaptics) 197 if (have_synaptics)
198 break; 198 break;
199 } 199 }
200@@ -844,24 +869,56 @@ xfce_pointers_helper_change_properties (gpointer key, 200@@ -847,24 +872,56 @@ xfce_pointers_helper_change_properties (gpointer key,
201 201
202 202
203 static void 203 static void
@@ -267,8 +267,11 @@ index 62ebc60..32662cc 100644
267 267
268 gdk_error_trap_push (); 268 gdk_error_trap_push ();
269 device_list = XListInputDevices (xdisplay, &ndevices); 269 device_list = XListInputDevices (xdisplay, &ndevices);
270@@ -873,84 +930,107 @@ xfce_pointers_helper_restore_devices (XfcePointersHelper *helper, 270@@ -874,86 +931,110 @@ xfce_pointers_helper_restore_devices (XfcePointersHelper *helper,
271 return;
272 }
271 273
274+ device_data = NULL;
272 for (n = 0; n < ndevices; n++) 275 for (n = 0; n < ndevices; n++)
273 { 276 {
274- /* filter the pointer devices */ 277- /* filter the pointer devices */
@@ -426,7 +429,7 @@ index 62ebc60..32662cc 100644
426 } 429 }
427 430
428 431
429@@ -961,12 +1041,12 @@ xfce_pointers_helper_channel_property_changed (XfconfChannel *channel, 432@@ -964,12 +1045,12 @@ xfce_pointers_helper_channel_property_changed (XfconfChannel *channel,
430 const GValue *value, 433 const GValue *value,
431 XfcePointersHelper *helper) 434 XfcePointersHelper *helper)
432 { 435 {
@@ -445,7 +448,7 @@ index 62ebc60..32662cc 100644
445 448
446 if (G_UNLIKELY (property_name == NULL)) 449 if (G_UNLIKELY (property_name == NULL))
447 return; 450 return;
448@@ -996,63 +1076,72 @@ xfce_pointers_helper_channel_property_changed (XfconfChannel *channel, 451@@ -1000,63 +1081,72 @@ xfce_pointers_helper_channel_property_changed (XfconfChannel *channel,
449 /* filter the pointer devices */ 452 /* filter the pointer devices */
450 device_info = &device_list[n]; 453 device_info = &device_list[n];
451 if (device_info->use != IsXExtensionPointer 454 if (device_info->use != IsXExtensionPointer
@@ -532,7 +535,7 @@ index 62ebc60..32662cc 100644
532 /* stop searching */ 535 /* stop searching */
533 n = ndevices; 536 n = ndevices;
534 } 537 }
535@@ -1068,26 +1157,44 @@ xfce_pointers_helper_channel_property_changed (XfconfChannel *channel, 538@@ -1072,26 +1162,44 @@ xfce_pointers_helper_channel_property_changed (XfconfChannel *channel,
536 539
537 540
538 541
@@ -582,5 +585,5 @@ index 62ebc60..32662cc 100644
582 } 585 }
583-#endif 586-#endif
584-- 587--
5851.7.6.5 5881.8.3.1
586 589