display: Simplify checks to see if a window is the root window
This commit is contained in:
parent
eb75306f8a
commit
75184d4c55
@ -2314,10 +2314,13 @@ handle_input_xevent (MetaDisplay *display,
|
|||||||
Window modified;
|
Window modified;
|
||||||
MetaWindow *window;
|
MetaWindow *window;
|
||||||
gboolean frame_was_receiver;
|
gboolean frame_was_receiver;
|
||||||
|
MetaScreen *screen;
|
||||||
|
|
||||||
if (input_event == NULL)
|
if (input_event == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
screen = meta_display_screen_for_root (display, device_event->root);
|
||||||
|
|
||||||
modified = xievent_get_modified_window (display, input_event);
|
modified = xievent_get_modified_window (display, input_event);
|
||||||
window = modified != None ? meta_display_lookup_x_window (display, modified) : NULL;
|
window = modified != None ? meta_display_lookup_x_window (display, modified) : NULL;
|
||||||
|
|
||||||
@ -2382,13 +2385,10 @@ handle_input_xevent (MetaDisplay *display,
|
|||||||
"none"));
|
"none"));
|
||||||
if (GRAB_OP_IS_WINDOW_SWITCH (display->grab_op))
|
if (GRAB_OP_IS_WINDOW_SWITCH (display->grab_op))
|
||||||
{
|
{
|
||||||
MetaScreen *screen;
|
|
||||||
meta_topic (META_DEBUG_WINDOW_OPS,
|
meta_topic (META_DEBUG_WINDOW_OPS,
|
||||||
"Syncing to old stack positions.\n");
|
"Syncing to old stack positions.\n");
|
||||||
screen =
|
|
||||||
meta_display_screen_for_root (display, device_event->event);
|
|
||||||
|
|
||||||
if (screen!=NULL)
|
if (device_event->root == device_event->event)
|
||||||
meta_stack_set_positions (screen->stack,
|
meta_stack_set_positions (screen->stack,
|
||||||
display->grab_old_window_stacking);
|
display->grab_old_window_stacking);
|
||||||
}
|
}
|
||||||
@ -2612,10 +2612,7 @@ handle_input_xevent (MetaDisplay *display,
|
|||||||
if (!window)
|
if (!window)
|
||||||
{
|
{
|
||||||
/* Check if the window is a root window. */
|
/* Check if the window is a root window. */
|
||||||
MetaScreen *screen =
|
if (enter_event->root == enter_event->event)
|
||||||
meta_display_screen_for_root(display,
|
|
||||||
enter_event->event);
|
|
||||||
if (screen == NULL)
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (enter_event->evtype == XI_FocusIn &&
|
if (enter_event->evtype == XI_FocusIn &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user