Re: [PATCH xserver v2 3/7] xwayland: "Accept" confineTo on InputOnly windows
On Mon, Feb 20, 2017 at 11:48 PM, Carlos Garnachowrote: > Of sorts, actually make it confine to the pointer focus, as the > InputOnly window is entirely invisible to xwayland accounting, > we don't have a xwl_window for it. > > Signed-off-by: Carlos Garnacho > --- > v2: Check that ConfineTo and focus windows clients are the same. NACK this patch, v1 is as good as it gets... This breaks for the Wine case as confining happens on a window created by the wineserver process and passed to the grabbing process, the InputOnly and focused InputOutput windows' clients differ and confining fails. If this is too uncomfortable, I can just think of checks to ensure both windows match in size/position. Cheers, Carlos ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver v2 3/7] xwayland: "Accept" confineTo on InputOnly windows
Of sorts, actually make it confine to the pointer focus, as the InputOnly window is entirely invisible to xwayland accounting, we don't have a xwl_window for it. Signed-off-by: Carlos Garnacho--- v2: Check that ConfineTo and focus windows clients are the same. hw/xwayland/xwayland.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/xwayland/xwayland.c b/hw/xwayland/xwayland.c index 9e24011..08643cb 100644 --- a/hw/xwayland/xwayland.c +++ b/hw/xwayland/xwayland.c @@ -209,6 +209,11 @@ xwl_cursor_confined_to(DeviceIntPtr device, } xwl_window = xwl_window_from_window(window); +if (!xwl_window && window->drawable.class == InputOnly && +wClient(window) == wClient(xwl_seat->focus_window->window)) { +DebugF("Confine on InputOnly window, assuming pointer focus\n"); +xwl_window = xwl_seat->focus_window; +} if (!xwl_window) return; -- 2.9.3 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel