[gnome-settings-daemon] wacom: Avoid crashing when opening the panel on wayland sessions
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] wacom: Avoid crashing when opening the panel on wayland sessions
- Date: Thu, 24 Mar 2016 15:47:10 +0000 (UTC)
commit 3c99cceb925c6f0e70d79221b3c9c39a72a51801
Author: Bastien Nocera <hadess hadess net>
Date: Thu Mar 24 16:43:16 2016 +0100
wacom: Avoid crashing when opening the panel on wayland sessions
We don't yet support wacom devices under wayland and GsdWacomDevice
uses X APIs unconditionally which makes us crash under wayland.
Instead, let's return early and leave the GsdWacomDevice in an invalid
state which means that we just present the default UI for "no wacom
devices detected".
Backported from commit 888e40eae8f26823f2e9bf0c37c45eafad467d07 in
gnome-control-center.
plugins/wacom/gsd-wacom-device.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/plugins/wacom/gsd-wacom-device.c b/plugins/wacom/gsd-wacom-device.c
index 4d05e35..0cf725b 100644
--- a/plugins/wacom/gsd-wacom-device.c
+++ b/plugins/wacom/gsd-wacom-device.c
@@ -1443,7 +1443,8 @@ gsd_wacom_device_constructor (GType type,
n_construct_properties,
construct_properties));
- if (device->priv->gdk_device == NULL)
+ if (device->priv->gdk_device == NULL ||
+ !GDK_IS_X11_DISPLAY (gdk_display_get_default ()))
return G_OBJECT (device);
device_manager = gdk_display_get_device_manager (gdk_display_get_default ());
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]