I was reading the brief summary on WineConf (http://yokozar.org/blog/archives/171) and saw an interesting item:
We need some help from Freedesktop.org for solving bug 10841.  Essentially we need a standard way of saying “hey reset the resolution when I’m done, even if I crash.” I was “volunteered” for the task of approaching the respective projects.
 
I believe this is a case that we can detect on our own, attached is a small standalone example of using fork() in such a way that you could reset the screen resolution even if an application crashed.

Erich Hoover
ehoover@mines.edu