mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2025-12-20 04:40:07 +01:00
xwayland: Activate no_focus_window when a Wayland window is activated
None active window might be interpreted from an X point of view as a transient focus state, and is used by multiple X window managers when a temporary focus change is in progress, or simply when grabbing the keyboard. From Wine side, we translate any active window change to the Win32 application, and handling None active window as an actual window deactivation and focus loss creates spurious events and an undesired feedback loop, as apps might react to it. We still want to be able to detect actual focus loss under an XWayland session, and having XWayland window manager focus an actual X window instead will make the distinction possible. Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
This commit is contained in:
parent
87ae07b63f
commit
2f35f84d8e
1 changed files with 2 additions and 2 deletions
|
|
@ -987,7 +987,7 @@ weston_wm_send_focus_window(struct weston_wm *wm,
|
|||
} else {
|
||||
xcb_set_input_focus (wm->conn,
|
||||
XCB_INPUT_FOCUS_POINTER_ROOT,
|
||||
XCB_NONE,
|
||||
wm->no_focus_window,
|
||||
XCB_TIME_CURRENT_TIME);
|
||||
}
|
||||
}
|
||||
|
|
@ -1011,7 +1011,7 @@ weston_wm_window_activate(struct wl_listener *listener, void *data)
|
|||
if (window) {
|
||||
weston_wm_set_net_active_window(wm, window->id);
|
||||
} else {
|
||||
weston_wm_set_net_active_window(wm, XCB_WINDOW_NONE);
|
||||
weston_wm_set_net_active_window(wm, wm->no_focus_window);
|
||||
}
|
||||
|
||||
weston_wm_send_focus_window(wm, window);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue