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

Tiago Vignatti tiago.vignatti at intel.com
Fri May 18 08:47:17 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 e557b8f..b0fe54e 100644
--- a/src/xserver-launcher.c
+++ b/src/xserver-launcher.c
@@ -667,6 +667,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