Resizing the root window

Jeremy Huddleston jeremyhu at freedesktop.org
Sat May 3 23:22:00 PDT 2008


I'm trying to figure out some issues with monitor hotplugging in  
Xquartz, and I think I've narrowed it down to the way we try to resize  
the root window and I was hoping to get some feedback on what would be  
"the right way" do do this.

We try changing the dimensions of the root window via:

pRoot = WindowTable[pScreen->myNum];
pScreen->ResizeWindow(pRoot, x - sx, y - sy, width, height, NULL);

I've spewed out some debugging that shows the following:

Calling: RootlessResizeWindow(pRoot, 0, 0, 1440, 1860, NULL)
pRoot->drawable now: 2720, 960
pRoot->clipList.extents now: 2720, 960
pRoot->borderClip.extents now: 2720, 960
pRoot->winSize.extents now: 2720, 960
pRoot->borderSize.extents now: 2720, 960

pScreen->ResizeWindow is RootlessResizeWindow which essentially just  
does miSlideAndSizeWindow via:

HUGE_ROOT(pWin);
SCREEN_UNWRAP(pScreen, ResizeWindow);
pScreen->ResizeWindow(pWin, x, y, w, h, pSib);
SCREEN_WRAP(pScreen, ResizeWindow);
NORMAL_ROOT(pWin);

Breakpoint 1, RootlessResizeWindow (pWin=0x581370, x=0, y=0, w=1440,  
h=1860, pSib=0x0) at rootlessWindow.c:1369
(gdb) print pScreen->ResizeWindow
$1 = (ResizeWindowProcPtr) 0x4f85f <miSlideAndSizeWindow>

And in miSlideAndSizeWindow, we have:

     /* if this is a root window, can't be resized */
     if (!(pParent = pWin->parent))
	return ;

So it looks like this is intentional.  So... how should I be resizing  
the root window?

Thanks in advance,
Jeremy

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3040 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20080503/1fc4206b/attachment.bin>


More information about the xorg mailing list