How on earth do you set your screen res after a crash??

Glynn Clements glynn at gclements.plus.com
Tue Oct 20 06:51:10 PDT 2009


Luke Benstead wrote:

> > I guess this looks like a bug with the OpenGL libraries rather than an XOrg
> > one after all, as I would assume the OpenGL libraries would restore the video
> > mode if the application terminated unexpectedly.
> 
> I think it is a bug with Xorg. The way I see it, an application
> shouldn't be able to leave the resolution in an undesired state, if an
> app crashes you should revert back to your chosen resolution.

It's a limitation rather than a bug.

> I've brought this up before, Windows has a concept of a temporary
> resolution change, if the app crashes the resolution is restored. I
> think Xrandr should have such a feature, where a resolution change is
> "attached" to the application window (although I have no clue about
> the technical issues with that). If an application crashes, or is
> alt+tabbed away from, the resolution should restore, although I don't
> know what level in the stack should take care of that.

If the resolution is associated with a window, that's something the WM
could take care of.

E.g. the client attaches a "full-screen" property to the window;
whenever the WM considers that window to be "active", the screen
resolution would be set to the window's size (or rather the smallest
available resolution large enough to contain the window), the window
(sans decorations) would be centred on screen, and all other windows
would be hidden. The WM would revert the changes when the window is no
longer active or no longer exists.

There's a chicken-and-egg problem in that WMs aren't likely to support
this feature if nothing uses it, and until it's widely supported,
applications wanting full-screen will have to do it themselves.

-- 
Glynn Clements <glynn at gclements.plus.com>



More information about the xorg mailing list