Hello again:
I have a workaround: if I set Mirroring in System Preferences --
Displays, then X11 sees only one display, and the X client app's
pull-down menus stay within it. This messes up my window positions for
regular mac apps, but it's only a little work to clean up.
I also attempted to the code a bit to see if configuration of some kind
got consulted in setting up the X windows views of "displays" and
"screens". Short answer: No, if I am reading the right code, and reading
it right.
I speculate that the source code to what I install as "xorg-server"
through Mac Ports can be found on Github at XQuartz/xorg-server
<https://github.com/XQuartz/xorg-server> . It's not terribly
straightforward to read, and I didn't do anything radical like download
and build the code, then step through it with a debugger. But I suspect
that the actual examination of the Mac OS displays and creating of the X
server's "displays" is done in function xprAddPseudoramiXScreens()
<https://github.com/XQuartz/xorg-server/blob/9d6b4d28f1a6422b00f5dca44b914e56668cb1db/hw/xquartz/xpr/xprScreen.c#L210>,
in xorg-server/hw/xquartz/xpr/xprScreen.c
<https://github.com/XQuartz/xorg-server/blob/9d6b4d28f1a6422b00f5dca44b914e56668cb1db/hw/xquartz/xpr/xprScreen.c#L210>
lines 204-277.
What I see there is this function getting a list of Mac OS displays by
calling CGGetActiveDisplayList()
<https://developer.apple.com/reference/coregraphics/1454603-cggetactivedisplaylist>.
It takes a union of the bounds of each Mac OS display. This lets it put
the location of each display in the union's coordinate system.
Then for each Mac OS display, it calls PseudoramiXAddScreen()
<https://github.com/XQuartz/xorg-server/blob/9d6b4d28f1a6422b00f5dca44b914e56668cb1db/pseudoramiX/pseudoramiX.c#L135>,
in xorg-server/pseudoramiX/pseudoramiX.c
<https://github.com/XQuartz/xorg-server/blob/9d6b4d28f1a6422b00f5dca44b914e56668cb1db/pseudoramiX/pseudoramiX.c>
lines 130-155. This appears to add the origin x, y, and the size w, h,
to a static array pseudoramiXScreens[]. As near as I can tell, this
array is queried by other functions in pseudoramiX.c, and not used
elsewhere.
I haven't been able to follow the plot beyond this point.
I do not see any code dealing with screen resolution. Thus, no evidence
for why randr's report of the current resolution changes when I change
the resolution of the Built-in Display using System Preferences --
Displays. I speculate that Core Graphics does some manipulation of
display size behind the scenes, so that each Mac OS display appears to
have the same resolution.
I also do not see any code dealing with configuration files. Thus, if
it's possible for configuration files to give me what I want, limiting
an X client to a single display with Xquartz, I haven't found evidence
for it.
I'd still like to get tips from anyone who understands how this part of
Xquartz is supposed to work, or pointers to documentation.
Thank you,
--Jim DeLaHunt
On 2017-01-19 01:30, Jim DeLaHunt wrote:
Hello, lovely X11 people:
This has got to be an FAQ, but I've been unable to find something in
the FAQ or list archives.
I am using XQuartz 1.18.4 (installed via MacPorts xorg-server 1.18.4_1).
I have a Mac OS X 10.10.5 laptop, with multiple displays:
* Main laptop screen is Retina "built-in display", 15.4-inch, with
2880x1800 resolution.
* I have the Built-in Display resolution to "default", a medium
setting between lots of windows with tiny text, and fewer windows
with larger text.
* External display is a SyncMaster Display, 24-inch, with 1920x1200
resolution.
* Display "Arrangement" is with the Built-in display below, holding
the primary menu bar, and the external monitor above it, with the
left edges aligned.
* The external SyncMaster display looks larger: both physically, and
in Display Preferences.
* The "Displays have separate Spaces" box in System Preferences --
Mission Control is UNchecked.
When I run the X server (double-click Applications/MacPorts/X11.app)
then run an X application "freeciv-gtk", the X display surface is a
rectangle which is the union of both displays. It includes some area
to the right of the Built-in Display and below the SyncMaster Display
which is not on either display. I can move X-client windows into this
area and they disappear. This is all on localhost, by the way.
My problem is app menus pulling down off the bottom of the SyncMaster
display. The X application "freeciv-gtk" has pop-up menus at the
bottom of its windows. When I position the app's window on the
SyncMaster display, and click to open the menus, they fall off the
bottom of the SyncMaster Display and into the Built-in Display below.
There is a menu bar at the top of the Built-in Display. Both the menu
bar and the physical gap between the displays makes the menus crossing
this boundary hard to use.
I believe that if the X app thinks its window is near the bottom of
the X display, these menus will pop upwards instead of downwards. That
would be good for me.
I would like to configure X11 on my Mac some way so that these menus
stay within the same physical display as the app window is on. How can
I do this?
This may require changing the Xquartz configuration so that it treats
the two Mac displays as two X display surfaces (I don't know the right
terminology). Alternatively, it's OK to have Xquartz limit the X
display surface only to my external SyncMaster display. Is this possible?
I'm having a hard time finding even a description of how Xquartz
system presents the Mac OS displays and preferences (size, resolution,
etc) in X windows terms. I remember reading that the "Displays have
separate Spaces" setting is significant. Surely all that is an FAQ,
and is written down somewhere?
In case it's useful, here's what xrandr shows when the Built-in
Display is at default, medium resolution:
% xrandr
xrandr: Failed to get size of gamma for output default
Screen 0: minimum 640 x 480, current 1920 x 2100, maximum 2880 x 2422
default connected 1920x2100+0+0 0mm x 0mm
[list of resolutions omitted]
And here's what xrandr shows when I set the Built-in Display to
maximum, tiny-text resolution:
% xrandr
xrandr: Failed to get size of gamma for output default
Screen 0: minimum 640 x 480, current 1920 x 2400, maximum 2880 x 2422
default connected 1920x2400+0+0 0mm x 0mm
[list of resolutions omitted]
The pixel width of the X display is 1920 pixels in each case. When the
Built-in Display is at medium resolution, the pixel height is (pixel
height of SyncMaster display + (pixel height of Built-in Display)/2).
When the Built-in Display is at maximum resolution, the pixel height
is (pixel height of SyncMaster display)*2, or ((pixel height of
SyncMaster display)/2 + (pixel height of Built-in Display)). I'm
willing to believe that maximum resolution for the Retina display is
twice as fine as default resolution. That makes these pixel heights
plausible, but doesn't explain them.
If this is written down somewhere, just giving me the link would be a
good start.
Thank you in advance!
--Jim DeLaHunt, Vancouver, Canada
--
--Jim DeLaHunt,[email protected] http://blog.jdlh.com/ (http://jdlh.com/)
multilingual websites consultant
157-2906 West Broadway, Vancouver BC V6K 2G8, Canada
Canada mobile +1-604-376-8953
--
--Jim DeLaHunt, [email protected] http://blog.jdlh.com/ (http://jdlh.com/)
multilingual websites consultant
157-2906 West Broadway, Vancouver BC V6K 2G8, Canada
Canada mobile +1-604-376-8953
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/x11-users/archive%40mail-archive.com
This email sent to [email protected]