From e957a2e5dd288f515f3e93724823542c20333f6a Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Fri, 12 Feb 2016 16:36:59 +0000 Subject: dix: Add hybrid full-size/empty-clip mode to SetRootClip 216bdbc735 removed the SetRootClip call in the XWayland output-hotplug handler when running rootless (e.g. as a part of Weston/Mutter), since the root window has no storage, so generating exposures will result in writes to invalid memory. Unfortunately, preventing the segfault also breaks sprite confinement. SetRootClip updates winSize and borderSize for the root window, which when combined with RRScreenSizeChanged calling ScreenRestructured, generates a new sprite-confinment area to update it to the whole screen. Removing this call results in the window geometry being reported correctly, but winSize/borderSize never changing from their values at startup, i.e. out of sync with the root window geometry / screen information in the connection info / XRandR. This patch introduces a hybrid mode, where we update winSize and borderSize for the root window, enabling sprite confinement to work correctly, but keep the clip emptied so exposures are never generated. Signed-off-by: Daniel Stone Tested-by: Olivier Fourdan Reviewed-by: Adam Jackson --- hw/xwayland/xwayland.h | 1 + 1 file changed, 1 insertion(+) (limited to 'hw/xwayland/xwayland.h') diff --git a/hw/xwayland/xwayland.h b/hw/xwayland/xwayland.h index a7d71193d..4fcdee5c9 100644 --- a/hw/xwayland/xwayland.h +++ b/hw/xwayland/xwayland.h @@ -49,6 +49,7 @@ struct xwl_screen { ScreenPtr screen; WindowPtr pointer_limbo_window; int expecting_event; + enum RootClipMode root_clip_mode; int wm_fd; int listen_fds[5]; -- cgit v1.2.3