Have ButtonPress and UnmapNotify events account for a null grab window,

2002-08-03  Craig Black  <blackc@speakeasy.net>

  * src/display.c: (event_callback): Have ButtonPress and UnmapNotify
  events account for a null grab window, fixes #87896
This commit is contained in:
Craig Black 2002-08-03 23:07:04 +00:00 committed by Craig Black
parent b51e6bdaa4
commit dc5a81ac77
2 changed files with 39 additions and 30 deletions

View File

@ -1,3 +1,8 @@
2002-08-03 Craig Black <blackc@speakeasy.net>
* src/display.c: (event_callback): Have ButtonPress and UnmapNotify
events account for a null grab window, fixes #87896
2002-08-03 Gaute Lindkvist <lindkvis@linpro.no> 2002-08-03 Gaute Lindkvist <lindkvis@linpro.no>
Corrected some issues with the Bright theme. Mainly Corrected some issues with the Bright theme. Mainly

View File

@ -1030,7 +1030,8 @@ event_callback (XEvent *event,
meta_display_process_key_event (display, window, event); meta_display_process_key_event (display, window, event);
break; break;
case ButtonPress: case ButtonPress:
if ((grab_op_is_mouse (display->grab_op) && if ((window &&
grab_op_is_mouse (display->grab_op) &&
display->grab_button != (int) event->xbutton.button && display->grab_button != (int) event->xbutton.button &&
display->grab_window == window) || display->grab_window == window) ||
grab_op_is_keyboard (display->grab_op)) grab_op_is_keyboard (display->grab_op))
@ -1340,11 +1341,13 @@ event_callback (XEvent *event,
} }
break; break;
case UnmapNotify: case UnmapNotify:
if (window)
{
if (display->grab_op != META_GRAB_OP_NONE && if (display->grab_op != META_GRAB_OP_NONE &&
display->grab_window == window) display->grab_window == window)
meta_display_end_grab_op (display, CurrentTime); meta_display_end_grab_op (display, CurrentTime);
if (!frame_was_receiver && window) if (!frame_was_receiver)
{ {
if (window->unmaps_pending == 0) if (window->unmaps_pending == 0)
{ {
@ -1370,6 +1373,7 @@ event_callback (XEvent *event,
*/ */
if (window) if (window)
meta_window_notify_focus (window, event); meta_window_notify_focus (window, event);
}
break; break;
case MapNotify: case MapNotify:
break; break;