Re: xv confused under quartz-wm?
Re: xv confused under quartz-wm?
- Subject: Re: xv confused under quartz-wm?
- From: Tom Lane <email@hidden>
- Date: Tue, 27 Jan 2009 19:50:13 -0500
- Comments: In-reply-to Tom Lane <email@hidden> message dated "Tue, 27 Jan 2009 16:59:14 -0500"
I wrote:
> Assuming that anyone felt like hacking xv to fix this, what would the
> appropriate thing be --- how *does* one find out the size of the apple
> menu in X-land?
I poked around in the xv sources and verified that it simply believes
it can use all the space reported by XDisplayHeight/XDisplayWidth (less
window borders, which it does know about). I can see the argument that
those should report the physical screen dimensions, but if so, shouldn't
there be a protocol to obtain the available screen space for windows?
What is it?
I did find this interesting hack in its Expose event handler...
#ifdef VMS
static int borders_sized = 0;
if (!borders_sized && !useroot && exp_event->window == mainW) {
/*
* Initial expose of main window, find the size of the ancestor
* window just prior to the root window and adjust saved size
* of display so that maximize functions will allow for window
* decorations.
*/
int status, count, mwid, mhgt, x, y, w, h, b, d, mbrd;
Window root, parent, *children, crw = exp_event->window;
borders_sized = 1;
status = XGetGeometry(theDisp, crw,
&root, &x, &y, &mwid, &mhgt, &mbrd, &d);
for ( parent = crw, w=mwid, h=mhgt;
status && (parent != root) && (parent != vrootW); ) {
crw = parent;
status = XQueryTree ( theDisp, crw, &root, &parent,
&children, &count );
if ( children != NULL ) XFree ( children );
}
status = XGetGeometry(theDisp, crw, &root, &x, &y, &w, &h, &b, &d);
if ( status ) {
dispWIDE = dispWIDE + mwid - w + (2*b);
dispHIGH = dispHIGH + mhgt - h + b;
/*printf("New display dims: %d %d\n", dispWIDE, dispHIGH ); */
}
}
#endif
but of course that's not getting compiled ...
regards, tom lane
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden