mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 09:30:45 -05:00
window: Properly handle focusing override redirect windows
If an app pops up an OR window and sets input focus to it, like Steam does, we'll think the focus window is null, causing us to think the app is not focused. OR windows should not be special if they get input focus, where the input focus would be set to NULL. Instead, the window should be marked as focused. https://bugzilla.gnome.org/show_bug.cgi?id=647706
This commit is contained in:
parent
d03ffd801e
commit
df8234c5e3
@ -1980,11 +1980,7 @@ handle_window_focus_event (MetaDisplay *display,
|
||||
{
|
||||
display->server_focus_window = event->event;
|
||||
display->server_focus_serial = serial;
|
||||
|
||||
if (window && window->override_redirect)
|
||||
focus_window = NULL;
|
||||
else
|
||||
focus_window = window;
|
||||
focus_window = window;
|
||||
}
|
||||
else if (event->evtype == XI_FocusOut)
|
||||
{
|
||||
|
@ -7193,6 +7193,8 @@ meta_window_set_focused_internal (MetaWindow *window,
|
||||
if (focused)
|
||||
{
|
||||
window->has_focus = TRUE;
|
||||
if (window->override_redirect)
|
||||
return;
|
||||
|
||||
/* Move to the front of the focusing workspace's MRU list.
|
||||
* We should only be "removing" it from the MRU list if it's
|
||||
@ -7258,8 +7260,11 @@ meta_window_set_focused_internal (MetaWindow *window,
|
||||
}
|
||||
else
|
||||
{
|
||||
meta_window_propagate_focus_appearance (window, FALSE);
|
||||
window->has_focus = FALSE;
|
||||
if (window->override_redirect)
|
||||
return;
|
||||
|
||||
meta_window_propagate_focus_appearance (window, FALSE);
|
||||
|
||||
if (!window->attached_focus_window)
|
||||
meta_window_appears_focused_changed (window);
|
||||
|
Loading…
Reference in New Issue
Block a user