summaryrefslogtreecommitdiff
path: root/typing-break
diff options
context:
space:
mode:
authorWu Xiaotian <[email protected]>2018-11-17 13:56:15 +0800
committerZenWalker <[email protected]>2018-11-19 18:44:13 +0100
commitc6c1db08970f009fcf2867a1ad2d4556485453ca (patch)
tree555bfdea444bc0905edbbb7ab22e6d9cc0d05ca8 /typing-break
parent73a72ba58f8b1dd9df1e0500ea46eace533eec6e (diff)
downloadmate-control-center-c6c1db08970f009fcf2867a1ad2d4556485453ca.tar.bz2
mate-control-center-c6c1db08970f009fcf2867a1ad2d4556485453ca.tar.xz
typing-break: replace deprecated gdk_error_trap functions
Diffstat (limited to 'typing-break')
-rw-r--r--typing-break/drw-selection.c10
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);