[mutter/wip/carlosg/fix-net-active-window: 16/17] x11: Use the currently focused X window for _NET_ACTIVE_WINDOW
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/fix-net-active-window: 16/17] x11: Use the currently focused X window for _NET_ACTIVE_WINDOW
- Date: Fri, 13 Sep 2019 20:56:16 +0000 (UTC)
commit 31df06d94ea4975c0d7e769478a5a4c445ce0919
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Sep 5 12:59:08 2019 +0200
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
src/x11/meta-x11-display.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/x11/meta-x11-display.c b/src/x11/meta-x11-display.c
index 4645c573a..5f2e71c44 100644
--- a/src/x11/meta-x11-display.c
+++ b/src/x11/meta-x11-display.c
@@ -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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]