[PATCH] XWayland: do not set wm->focus_window to a window with no frame

Axel Davy axel.davy at ens.fr
Fri Nov 15 05:04:38 PST 2013


An unmapped window shouldn't be the input focus.
This solves some remaining Weston crashes with XWayland,
because we assume wm->focus_window has a frame.

Signed-off-by: Axel Davy <axel.davy at ens.fr>
---
 src/xwayland/window-manager.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/xwayland/window-manager.c b/src/xwayland/window-manager.c
index 7783d2c..70244ab 100644
--- a/src/xwayland/window-manager.c
+++ b/src/xwayland/window-manager.c
@@ -671,6 +671,8 @@ weston_wm_window_activate(struct wl_listener *listener, void *data)
 
 	if (surface) {
 		window = get_wm_window(surface);
+		if (window && !window->frame)
+			window = NULL;
 	}
 
 	if (window) {
-- 
1.8.1.2



More information about the wayland-devel mailing list