x11: Use the currently focused X window for _NET_ACTIVE_WINDOW
MetaDisplay and MetaX11Display focus windows are slightly decoupled, we cannot rely here on the MetaDisplay focus to be updated yet. We however know the X Window that got focused, so lookup the corresponding MetaWindow (and client X window) from it. Closes: https://gitlab.gnome.org/GNOME/mutter/issues/751
This commit is contained in:
parent
ecec9a7eaa
commit
31df06d94e
@ -1828,12 +1828,15 @@ meta_x11_display_increment_event_serial (MetaX11Display *x11_display)
|
||||
void
|
||||
meta_x11_display_update_active_window_hint (MetaX11Display *x11_display)
|
||||
{
|
||||
MetaWindow *focus_window = x11_display->display->focus_window;
|
||||
MetaWindow *focus_window;
|
||||
gulong data[1];
|
||||
|
||||
if (x11_display->display->closing)
|
||||
return; /* Leave old value for a replacement */
|
||||
|
||||
focus_window = meta_x11_display_lookup_x_window (x11_display,
|
||||
x11_display->focus_xwindow);
|
||||
|
||||
if (focus_window)
|
||||
data[0] = focus_window->xwindow;
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user