diff options
author | Wu Xiaotian <[email protected]> | 2018-11-17 13:56:15 +0800 |
---|---|---|
committer | ZenWalker <[email protected]> | 2018-11-19 18:44:13 +0100 |
commit | c6c1db08970f009fcf2867a1ad2d4556485453ca (patch) | |
tree | 555bfdea444bc0905edbbb7ab22e6d9cc0d05ca8 | |
parent | 73a72ba58f8b1dd9df1e0500ea46eace533eec6e (diff) | |
download | mate-control-center-c6c1db08970f009fcf2867a1ad2d4556485453ca.tar.bz2 mate-control-center-c6c1db08970f009fcf2867a1ad2d4556485453ca.tar.xz |
typing-break: replace deprecated gdk_error_trap functions
-rw-r--r-- | typing-break/drw-selection.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/typing-break/drw-selection.c b/typing-break/drw-selection.c index 48b7db55..7b5b05ca 100644 --- a/typing-break/drw-selection.c +++ b/typing-break/drw-selection.c @@ -70,10 +70,14 @@ drw_selection_clear (GtkWidget *widget, static gboolean drw_selection_find_existing (DrwSelection *drw_selection) { - Display *xdisplay = GDK_DISPLAY_XDISPLAY(gdk_display_get_default()); + GdkDisplay *display; Window old; + Display *xdisplay; + + display = gdk_display_get_default (); + xdisplay = GDK_DISPLAY_XDISPLAY(display); - gdk_error_trap_push (); + gdk_x11_display_error_trap_push (display); old = XGetSelectionOwner (xdisplay, gdk_x11_get_xatom_by_name (SELECTION_NAME)); if (old) { @@ -82,7 +86,7 @@ drw_selection_find_existing (DrwSelection *drw_selection) } XSync (xdisplay, False); - if (gdk_error_trap_pop () == 0 && drw_selection->owner_window) { + if (gdk_x11_display_error_trap_pop (display) == 0 && drw_selection->owner_window) { gdk_window_add_filter (drw_selection->owner_window, drw_selection_filter, drw_selection); |