x11: Fix error traps in the dnd code

The code for grabbing keys was using a generic
error trap call, and more concerning, it was forgetting
to pop the trap.
This commit is contained in:
Matthias Clasen 2017-11-16 23:56:11 -05:00
parent daacd25344
commit 90d502fdbd

View File

@ -2690,7 +2690,7 @@ drag_context_grab (GdkDragContext *context)
g_set_object (&x11_context->grab_seat, seat);
gdk_error_trap_push ();
gdk_x11_display_error_trap_push (context->display);
for (i = 0; i < G_N_ELEMENTS (grab_keys); ++i)
{
@ -2742,6 +2742,8 @@ drag_context_grab (GdkDragContext *context)
}
}
gdk_x11_display_error_trap_pop_ignored (context->display);
return TRUE;
}