[Xquartz-dev] Basic implementation of XRandR

Per Johansson pelle at morth.org
Mon Jun 14 00:44:38 PDT 2010


14 jun 2010 kl. 07.26 skrev Jeremy Huddleston:

> Yes, Jan.  A big thanks.  I've started looking through the patch set and I have a few questions.  I wanted to give it a test run first (which hopefully I'll be able to do tomorrow), but here's what I've been thinking...
> 
> The main issue is with the second patch... you have indicated reservations as well, and I think we will need to investigate this further.  The X11 screen and root windows do not actually include the menu bar unless we are in fullscreen, so I'm concerned that the second patch may cause problems since we'll not be reporting the correct resolution of the X11 screen.  Was the problem that the menu bar was incorrectly being subtracted when it was already not included?

I think you have to hide the menu bar. In most cases, the app that uses XRandR will open a window of the same resolution it switched to. Switching to fullscreen is probably the best solution.

> Perhaps we can do something "interesting" to tackle both of these issues.  We can include the resolution with the menu bar subtracted in the list of resolutions.  If XRandR chooses any resolution except that one, we can switch to quartz fullscreen mode (not the X11 cmd-alt-a fullscreen) in expectation of a game taking over like Codeweavers does.  Switching back to the normal resolution would then result in returning to normal mode.

That's exactly what I did in my incomplete version. Make sure to make the desktop resolution the first one listed, as that will be the default one switch to.

You probably have to make sure that cmd-option-a will always take you out off fullscreen as well. Otherwise a crashing game might end you up with a black screen and no options except cmd-option-escape to get out, which will force quit X11 (and I think a lot of people do not know about that combination). In the best case some information about this would be displayed on the root window as well, though that'd be up to quartz-wm I guess.

Both OS X and Windows handles this differently. In them, if the application that switches resolution exits, it is automatically switched back to the default one. Perhaps something to suggest to the other X11 developers?
-- 
Pelle Johansson


More information about the Xquartz-dev mailing list