Skip to content
Permalink
Browse files

typing-break: replace deprecated gdk_error_trap functions

  • Loading branch information...
yetist authored and sc0w committed Nov 17, 2018
1 parent 73a72ba commit c6c1db08970f009fcf2867a1ad2d4556485453ca
Showing with 7 additions and 3 deletions.
  1. +7 −3 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);

0 comments on commit c6c1db0

Please sign in to comment.
You can’t perform that action at this time.