How to obtain the available dimensions of window
Hello, Is there a function (or any method) that can tell me the left space available for an already maped top level window (parent is root window) ? The method for new top level window are possible: set the value of width and height very high then the window manager will reduce it automatically when maping. For instance when I set 768 as height, the window manager will reduce it to 700 (I use getgeometry). In fact the window/desktop manager reduces the size because of existence of title bar, decoration, and some menu bar. I can not do this method for a maped window, do you know any solution ? Thank you ___ Devel mailing list Devel@XFree86.Org http://XFree86.Org/mailman/listinfo/devel
Re: How to obtain the available dimensions of window
On 2007-12-29 (December, Saturday), intmail wrote: Hello, Is there a function (or any method) that can tell me the left space available for an already maped top level window (parent is root window) ? Hi! I am not sure if I understand your question correctly but I don't think that there is. You will have to find geometry of the root window, and geometry of the window in question and calculate the space left by yourself. The method for new top level window are possible: set the value of width and height very high then the window manager will reduce it automatically when maping. For instance when I set 768 as height, the window manager will reduce it to 700 (I use getgeometry). In fact the window/desktop manager reduces the size because of existence of title bar, decoration, and some menu bar. You shouldn't relay on this particular behaviour of your particular windowmanager for it is not guaranteed to be present with other windowmanagers and for all I can tell, other windowmanagers do not act in this manner. I can not do this method for a maped window, do you know any solution ? You might be interested in these functions: XGetWindowProperty XGetWindowAttributes XGetGeometry XTranslateCoordinates See also: http://tronche.com/gui/x/icccm/sec-4.html#s-4.2.1 -- Josip Deanovic ___ Devel mailing list Devel@XFree86.Org http://XFree86.Org/mailman/listinfo/devel
Re: X driver: Using offscreen memory manager for Xv
On Mon, 26 Nov 2007, Bankim Bhavsar wrote: I'm implementing Xv extension of linux X driver. I need to use offscreen memory to allocate space for incoming video-frames. Currently, I am using xf86InitFBManager() part of xf86fbman.h to initialize offscreen memory by specifying a BoxPtr. The offscreen memory is initialized such that it starts just after the on-screen memory (using Frame Buffer Size). When there is a ModeSwitch the Frame Buffer Size changes and the offscreen memory previously allocated becomes a part of the on-screen memory and causes X to crash. I was thinking of re-initalizing the Offscreen memory manager on ModeSwitch and modify the previously allocated pointers accordingly but I don't see a way to re-initialize the offscreen memory. One possible solution would be to leave some space before starting the offscreen memory. That would work for common case but still doesn't guarantee the framebuffer extending into the previously initialized offscreen memory. I also looked into EXA but doesn't seem to serve the purpose either. Am I missing out on something? Any other possible solution? Can someone point me to a driver that uses EXA and handles the offscreen memory on ModeSwitch? No, mode switches are irrelevent. xf86InitFBManager() factors out the _virtual_ resolution, not the physical one. If you are seeing crashes, it's because your driver incorrectly uses a virtual resolution that does not include all physical modes the user can switch to. Marc. +--+--+ | Marc Aurele La France | work: 1-780-492-9310 | | Academic Information and| fax:1-780-492-1729 | |Communications Technologies | email: [EMAIL PROTECTED] | | 352 General Services Building +--+ | University of Alberta | | | Edmonton, Alberta |Standard disclaimers apply| | T6G 2H1 | | | CANADA | | +--+--+ ___ Devel mailing list Devel@XFree86.Org http://XFree86.Org/mailman/listinfo/devel