[PATCH weston v2] xwm: don't let X windows steal the focus

Bill Spitzak spitzak at gmail.com
Mon Mar 30 11:05:44 PDT 2015


On 03/29/2015 04:20 AM, Giulio Camuffo wrote:

> +static void
> +weston_wm_handle_focus_in(struct weston_wm *wm, xcb_generic_event_t *event)
> +{
> +	xcb_focus_in_event_t *focus = (xcb_focus_in_event_t *) event;
> +	/* Do not let X clients change the focus behind the compositor's
> +	 * back. Reset the focus to the old one if it changed. */
> +	if (!wm->focus_window || focus->event != wm->focus_window->id)
> +		weston_wm_send_focus_window(wm, wm->focus_window);
> +}

Is the window id really stored in focus->event?


More information about the wayland-devel mailing list