Re: Is there a way to programmatically determine if the X Server is using XQuartz?
Re: Is there a way to programmatically determine if the X Server is using XQuartz?
- Subject: Re: Is there a way to programmatically determine if the X Server is using XQuartz?
- From: Jeremy Huddleston <email@hidden>
- Date: Fri, 17 Dec 2010 09:45:12 -0800
On Dec 17, 2010, at 07:36, Ken Thomases wrote:
> On Dec 16, 2010, at 10:39 PM, Jeremy Huddleston wrote:
>
>> On Dec 16, 2010, at 18:02, Cook, Rich wrote:
>>
>>> I am having an issue where I place a window in my application and then XQuartz moves it down 22 pixels I guess to make room for the title bar. I need to correct for this behavior, but it only happens when the X Server is X11.app or Xorg.app. Is there a way for my Unix application (running on linux or OS X) to detect XQuartz and take evasive action? Thanks!
>>
>> The X11 side of XQuartz actually doesn't even know about the menu bar. If you notice, the X11 display thinks the resolution is 22 pixels smaller than it really is (because the menu bar is not part of X11).
>
> The window title bar is also 22 pixels high. Wine encountered this problem a while back. It had to do with quartz-wm not respecting the StaticGravity window gravity constant (XSizeHints.win_gravity, XSetWMNormalHints). I had thought it had been fixed, but it might depend on what version of quartz-wm you're using (which would in turn depend on which version of Mac OS X and maybe XQuartz).
>
> You can look at what Wine does to work around the issue, although the code is LGPL so be cautious about directly copying code. Search Wine's dlls/winex11.drv/ for "applewm". <http://source.winehq.org/git/wine.git/?a=tree;f=dlls/winex11.drv> The relevant stuff is in window.c and x11drv_main.c.
Yes, but that particular issue should be fixed in all shipping versions of quartz-wm (latest Leopard, latest SL, and latest xquartz.macosforge.org release). Tiger probably still has the issue, but it should be fixed everywhere else.
Still, a reproducible test case would help out. _______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden