[gnome-control-center/wip/carlosg/common-cleanup: 21/21] common: Update to gdk/x11 API
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/wip/carlosg/common-cleanup: 21/21] common: Update to gdk/x11 API
- Date: Thu, 8 Aug 2019 15:18:37 +0000 (UTC)
commit f57a117cc141b4e603e4679337d98a9a5729f6b5
Author: Carlos Garnacho <carlosg gnome org>
Date: Sat Jul 27 11:26:29 2019 +0200
common: Update to gdk/x11 API
We use gdk_error_trap*() in this little piece of remaining x11
code. Update to gdk_x11_display_error_trap*() found more recent
gtk.
panels/common/gsd-input-helper.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/panels/common/gsd-input-helper.c b/panels/common/gsd-input-helper.c
index 5d72aeb7b..6ffc18b68 100644
--- a/panels/common/gsd-input-helper.c
+++ b/panels/common/gsd-input-helper.c
@@ -60,6 +60,7 @@ mouse_is_present (void)
char *
xdevice_get_device_node (int deviceid)
{
+ GdkDisplay *display;
Atom prop;
Atom act_type;
int act_format;
@@ -67,22 +68,23 @@ xdevice_get_device_node (int deviceid)
unsigned char *data;
char *ret;
- gdk_display_sync (gdk_display_get_default ());
+ display = gdk_display_get_default ();
+ gdk_display_sync (display);
- prop = XInternAtom (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), "Device Node", False);
+ prop = XInternAtom (GDK_DISPLAY_XDISPLAY (display), "Device Node", False);
if (!prop)
return NULL;
- gdk_error_trap_push ();
+ gdk_x11_display_error_trap_push (display);
- if (!XIGetProperty (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
+ if (!XIGetProperty (GDK_DISPLAY_XDISPLAY (display),
deviceid, prop, 0, 1000, False,
AnyPropertyType, &act_type, &act_format,
&nitems, &bytes_after, &data) == Success) {
- gdk_error_trap_pop_ignored ();
+ gdk_x11_display_error_trap_pop_ignored (display);
return NULL;
}
- if (gdk_error_trap_pop ())
+ if (gdk_x11_display_error_trap_pop (display))
goto out;
if (nitems == 0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]