Discussion:
[Xquartz-dev] Fix (?) for window positions when displays have separate Spaces
Jeremy Huddleston Sequoia
2015-04-30 23:28:33 UTC
Permalink
This looks right. Thanks for catching this, Tom. I'll be sure to get it into the next release which will likely be around the end of May.

Thanks,
Jeremy
I've been having all sorts of problems with XQuartz and quartz-wm when the `Displays have separate Spaces' option is set. This seems to be due to the aquaBarMenuHeight calculation being a bit unusual - on my system it gets things hopelessly wrong, and decides the menu bar is -500 pixels high.
With my change (patch attached) it gets the right value, and windows are appropriately constrained to the screens' visible frames. Full screen mode still doesn't work, though.
Regards,
--
--Tom Seddon
P.S. I initially tried attacking this problem by editing quartz-wm. Something I noticed while doing this: when displays have separate spaces, the main screen is no longer fixed, meaning the result of [NSScreen mainScreen] isn't necessarily consistent.
But this doesn't happen to quartz-wm - it always gets the same result back from [NSScreen mainScreen], no matter what the true main screen. The reason for this, I found, was simply that it never creates an NSWindow. (I have no idea what the underlying reason for that is, and/or whether it's something you're supposed to be able to rely on.)
The calculations in x_screen actually seem to rely on the main screen always being the same, so if you "fix" it as I did, by creating a NSWindow object at some point, you get a whole second set of problems...
<xserver-fix-aquaMenuBarHeight.txt>
_______________________________________________
Xquartz-dev mailing list
https://lists.macosforge.org/mailman/listinfo/xquartz-dev
Loading...