On Mar 17, 2010, at 17:15 , Bill Campbell wrote:
The clusterssh program is a perl::Tk script which executes multiple xterms via ssh to the remote systems. It is not a problem with the remote perl::Tk routing not getting screen size change info as I always shut that connection down before putting the Macbook Pro to sleep. One thing I have not tried doing is opening a new xterm in the running X11, and executing the commands from it to see if it gets new size information on startup while an open xterm does not.
I have to plead ignorance in how X11 handles display geometry in one screen, much less multiple monitors.
XQuartz doesn't even try currently; it would be nice if monitor changes were passed on as XRandR extension events, but right now the X session isn't informed of any changes and you need to restart XQuartz to get it to see the change. I keep wanting to find time to poke at XRandR support, but truth be told I'm a bit too far behind on X11 internals at this point (my experience is from early-mid 90s, and things have changed quite a lot since then). -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH
On Mar 17, 2010, at 14:40, Brandon Allbery wrote:
On Mar 17, 2010, at 17:15 , Bill Campbell wrote:
The clusterssh program is a perl::Tk script which executes multiple xterms via ssh to the remote systems. It is not a problem with the remote perl::Tk routing not getting screen size change info as I always shut that connection down before putting the Macbook Pro to sleep. One thing I have not tried doing is opening a new xterm in the running X11, and executing the commands from it to see if it gets new size information on startup while an open xterm does not.
I have to plead ignorance in how X11 handles display geometry in one screen, much less multiple monitors.
XQuartz doesn't even try currently;
Uhm... are you kidding? This support was added quite some time ago. It was buggy for a while, but it has been working for quite some time. This is the whole reason for the XP_EVENT_DISPLAY_CHANGED xp_event from Xplugin. This event is translated into an kXquartzDisplayChanged event to the DDX which results in QuartzUpdateScreens being called. Here's the code that handles that: http://cgit.freedesktop.org/~jeremyhu/xserver/tree/hw/xquartz/quartz.c line 234 http://cgit.freedesktop.org/~jeremyhu/xserver/tree/hw/xquartz/xpr/xprScreen.... line 395 If you are having trouble, please enable the debug logging and report the relevant lines from the debug log. To enable the debug logging, just create a file ~/x11-debug.txt and restart XQuartz.app You should see lines like this when the display configuration changes: DEBUG_LOG("displayCount: %d\n", (int)displayCount); DEBUG_LOG(" screen union origin: (%d,%d) size: (%d,%d).\n", *x, *y, *width, *height); DEBUG_LOG(" placed at X11 coordinate (%d,%d).\n", (int)frame.origin.x, (int)frame.origin.y); DEBUG_LOG("Root Window: %dx%d @ (%d, %d) darwinMainScreen (%d, %d) xy (%d, %d) dixScreenOrigins (%d, %d)\n", width, height, x - sx, y - sy, darwinMainScreenX, darwinMainScreenY, x, y, dixScreenOrigins[pScreen->myNum].x, dixScreenOrigins[pScreen->myNum].y); That information will help narrow down the problem. If you DON'T see the lines, that is evident that the event is not being sent for some reason, and we will need to figure out why that is. --Jeremy
it would be nice if monitor changes were passed on as XRandR extension events, but right now the X session isn't informed of any changes and you need to restart XQuartz to get it to see the change.
That's not completely true. We don't support RandR, but clients are free to query the screen at any time.
On Mar 17, 2010, at 19:56 , Jeremy Huddleston wrote:
Uhm... are you kidding? This support was added quite some time ago. It was buggy for a while, but it has been working for quite some time. This is the whole reason for the XP_EVENT_DISPLAY_CHANGED
I specifically recall asking about this and getting an "I don't see the point" answer back from you. Now I'm wondering what you thought I was talking about.
it would be nice if monitor changes were passed on as XRandR extension events, but right now the X session isn't informed of any changes and you need to restart XQuartz to get it to see the change.
That's not completely true. We don't support RandR, but clients are free to query the screen at any time.
...guess that answers *that* question. Modern X11 clients expect to receive XRandR events for this. Otherwise you need to register interest in root window Reconfigure events, and (aside from that only being made available after XRandR was implemented, due to fear that changing root window sizes would confuse existing programs) that is only partially useful for the case of programs wanting to know the actual screen configuration (which I assume XQuartz isn't doing, but it's what people expect to work with; root window sizes are disrecommended on other platforms) so the vast majority of programs that care use XRandR. In short, programs that want to support OSX are apparently expected to use a mechanism that on other platforms one is told to use XRandR for. This seems unfortunate at best. -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH
On Mar 17, 2010, at 19:31, Brandon Allbery wrote:
On Mar 17, 2010, at 19:56 , Jeremy Huddleston wrote:
Uhm... are you kidding? This support was added quite some time ago. It was buggy for a while, but it has been working for quite some time. This is the whole reason for the XP_EVENT_DISPLAY_CHANGED
I specifically recall asking about this and getting an "I don't see the point" answer back from you. Now I'm wondering what you thought I was talking about.
The "I don't see the point" is mainly for RandR. There is a point for RandR, but it's not a big point. We do support screen resizing outside of RandR.
it would be nice if monitor changes were passed on as XRandR extension events, but right now the X session isn't informed of any changes and you need to restart XQuartz to get it to see the change.
That's not completely true. We don't support RandR, but clients are free to query the screen at any time.
...guess that answers *that* question.
Modern X11 clients expect to receive XRandR events for this. Otherwise you need to register interest in root window Reconfigure events, and (aside from that only being made available after XRandR was implemented, due to fear that changing root window sizes would confuse existing programs) that is only partially useful for the case of programs wanting to know the actual screen configuration (which I assume XQuartz isn't doing, but it's what people expect to work with; root window sizes are disrecommended on other platforms) so the vast majority of programs that care use XRandR.
In short, programs that want to support OSX are apparently expected to use a mechanism that on other platforms one is told to use XRandR for. This seems unfortunate at best.
Well, most applications that people care about on XQuartz don't really care about these events... That being said, RandR support is on the horizon... but there are more pressing issues still...
participants (2)
-
Brandon Allbery
-
Jeremy Huddleston