File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -141,13 +141,15 @@ gpm_button_grab_keystring (GpmButton *button, guint64 keycode)
141141{
142142 guint modmask = AnyModifier ;
143143 Display * display ;
144+ GdkDisplay * gdkdisplay ;
144145 gint ret ;
145146
146147 /* get the current X Display */
147148 display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
148149
149150 /* don't abort on error */
150- gdk_error_trap_push ();
151+ gdkdisplay = gdk_display_get_default ();
152+ gdk_x11_display_error_trap_push (gdkdisplay );
151153
152154 /* grab the key if possible */
153155 ret = XGrabKey (display , keycode , modmask ,
@@ -170,8 +172,8 @@ gpm_button_grab_keystring (GpmButton *button, guint64 keycode)
170172 }
171173
172174 /* we are not processing the error */
173- gdk_flush ( );
174- gdk_error_trap_pop_ignored ( );
175+ gdk_display_flush ( gdkdisplay );
176+ gdk_x11_display_error_trap_pop_ignored ( gdkdisplay );
175177
176178 egg_debug ("Grabbed modmask=%x, keycode=%li" , modmask , (long int ) keycode );
177179 return TRUE;
You can’t perform that action at this time.
0 commit comments