File tree 1 file changed +5
-3
lines changed
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)
141
141
{
142
142
guint modmask = AnyModifier ;
143
143
Display * display ;
144
+ GdkDisplay * gdkdisplay ;
144
145
gint ret ;
145
146
146
147
/* get the current X Display */
147
148
display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
148
149
149
150
/* don't abort on error */
150
- gdk_error_trap_push ();
151
+ gdkdisplay = gdk_display_get_default ();
152
+ gdk_x11_display_error_trap_push (gdkdisplay );
151
153
152
154
/* grab the key if possible */
153
155
ret = XGrabKey (display , keycode , modmask ,
@@ -170,8 +172,8 @@ gpm_button_grab_keystring (GpmButton *button, guint64 keycode)
170
172
}
171
173
172
174
/* 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 );
175
177
176
178
egg_debug ("Grabbed modmask=%x, keycode=%li" , modmask , (long int ) keycode );
177
179
return TRUE;
You can’t perform that action at this time.
0 commit comments