[PATCH] rootless: Adjust the frame size of the native root window in RootlessResizeWindow
Jeremy Huddleston
jeremyhu at apple.com
Mon Jul 19 09:05:07 PDT 2010
Ping for review.
Jon, my guess is that you guys don't even enter this codepath. If that's the case, please just let me know. I'd like to get this fix into 1.9.
Thanks,
Jeremy
On Jul 17, 2010, at 12:23, Jeremy Huddleston wrote:
> If the native root window isn't resized as well, we will likely crash the
> next time we draw to the root. On OS X, this can be seen by:
>
> 1) Put the display preferences in the menu bar and set X11's preferences so you
> can access the menu bar in fullscreen mode
> 2) Set the resolution of your screen lower than normal.
> 3) Start X11 in fullscreen mode. The root window will cover the screen as
> expected.
> 4) Use the menu bar to increase the resolution of the display. The root
> window will now cover the old area and not the full screen, but
> 'xwininfo -root' will report the full width.
> 5) Run 'xsetroot -solid red', and we have the crash you mention above.
>
> Leaving/entering fullscreen after #4 will fix the problem. This is because the
> WINREC is erased when we leave fullscreen mode and it is recreated upon
> re-entry:
>
> RootlessUpdateRooted(FALSE)
> RootlessDisableRoot(screenInfo.screens[0])
> RootlessDestroyFrame (pRoot, winRec);
> RootlessUpdateRooted(TRUE)
> RootlessEnableRoot(screenInfo.screens[0])
> RootlessEnsureFrame(screenInfo.screens[0]->pRoot)
> creates a new WINREC...
>
> Signed-off-by: Jan Hauffa <hauffa at in.tum.de>
> Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
> ---
> miext/rootless/rootlessWindow.c | 7 +++++++
> 1 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/miext/rootless/rootlessWindow.c b/miext/rootless/rootlessWindow.c
> index 7fe5e1d..bef8a2f 100644
> --- a/miext/rootless/rootlessWindow.c
> +++ b/miext/rootless/rootlessWindow.c
> @@ -1315,6 +1315,13 @@ RootlessResizeWindow(WindowPtr pWin, int x, int y,
> RegionCopy(&pWin->clipList, &pWin->winSize);
> RegionCopy(&pWin->borderClip, &pWin->winSize);
>
> + if (winRec) {
> + SCREENREC(pScreen)->imp->ResizeFrame(winRec->wid, pScreen,
> + x + SCREEN_TO_GLOBAL_X,
> + y + SCREEN_TO_GLOBAL_Y,
> + w, h, RL_GRAVITY_NONE);
> + }
> +
> miSendExposures(pWin, &pWin->borderClip,
> pWin->drawable.x, pWin->drawable.y);
> }
> --
> 1.7.1.1
>
>
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
More information about the xorg-devel
mailing list