[PATCH 6/6 weston] xserver: send input focus only for top-level windows

Tiago Vignatti tiago.vignatti at intel.com
Mon May 21 06:47:50 PDT 2012


Signed-off-by: Tiago Vignatti <tiago.vignatti at intel.com>
---
 src/xserver-launcher.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/xserver-launcher.c b/src/xserver-launcher.c
index 414c06a..adc73af 100644
--- a/src/xserver-launcher.c
+++ b/src/xserver-launcher.c
@@ -759,6 +759,12 @@ static void
 weston_wm_activate(struct weston_wm *wm,
 		 struct weston_wm_window *window, xcb_timestamp_t time)
 {
+	/* send the focus only for top-level windows. We might want to improve
+	 * the logic better here to satisfy this:
+	 * http://tronche.com/gui/x/icccm/sec-4.html#s-4.1.7 */
+	if (window->transient_for)
+		return;
+
 	xcb_client_message_event_t client_message;
 
 	client_message.response_type = XCB_CLIENT_MESSAGE;
-- 
1.7.9.5



More information about the wayland-devel mailing list