<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">
&gt; Basically, xrandr is designed under the assumption that a resolution change<br>
&gt; is permanent, or at least semi-permanent (e.g. until reboot or manual switch<br>
&gt; back) and system wide. The problem is that games (as an example) require a<br>
&gt; temporary resolution change that is associated with a single window. What I<br>
&gt; mean by this is that when a game initializes it sets the resolution (through<br>
&gt; SDL, X, Win32 on Wine etc.) and this is frequently a resolution below native<br>
&gt; normally for performance reasons (e.g. your PC may not like running Alien<br>
&gt; Arena at full HD, but it will run perfectly well at 1024x768).<br>
&gt;<br>
&gt; Ideally, if that game then crashed, or someone ALT+TAB&#39;d to a different<br>
&gt; window, the native resolution would be restored. If the user then switched<br>
&gt; back to the window, then the game&#39;s resolution would be restored. On<br>
&gt; Windows, it&#39;s possible to pass a temporary flag to the Win32<br>
&gt; ChangeDisplaySettings()* function for this behaviour.<br>
<br>
</div>Could you elaborate on how Windows handles this?<br></blockquote><div><br>I don&#39;t know much about what it does under the hood, but there is a little more information here: <a href="http://blogs.msdn.com/b/oldnewthing/archive/2008/01/04/6973747.aspx">http://blogs.msdn.com/b/oldnewthing/archive/2008/01/04/6973747.aspx</a><br>
<br>The general idea is that it:<br><br>1. Restores the native resolution when the application exits<br>2. Restores the native resolution when the application window loses focus<br>3. Goes back to the non-native resolution when the window gains focus<br>
4. Doesn&#39;t reorganize the desktop etc. (e.g other applications don&#39;t get a  WM_DISPLAYCHANGED message - <a href="http://msdn.microsoft.com/en-us/library/dd145210%28v=VS.85%29.aspx">http://msdn.microsoft.com/en-us/library/dd145210%28v=VS.85%29.aspx</a>)<br>
5. If the window loses focus, it is minimized automatically. <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im"><br>
&gt; At the moment, if a game crashes (either native, or run via Wine) on X you<br>
&gt; are left with a low resolution and have to find your way to the Monitor<br>
&gt; control panel to set it back. Which is obviously not ideal.<br>
&gt;<br>
&gt; So, basically I&#39;m hoping that Wayland can fix this issue by allowing a<br>
&gt; resolution change to be associated with a single window.<br>
<br>
</div>Could you expound on how you think Wayland should behave in this<br>
situation?<br>
<font color="#888888"><br>
Bryce<br></font></blockquote><div><br>I think basically, similar to windows. So, in the API call that sets the resolution, allow an optional parameter which takes the ID of the window. If the window does not have focus (or ceases to exist), restore the previous resolution. I don&#39;t really know how Wayland works so I can&#39;t really suggest much more than that.<br>
<br>I do have another idea, but whether it would work in practice I&#39;m not sure, so I&#39;ll just throw this out there. What if, instead of changing the native resolution, Wayland allocated an off-screen buffer of the requested resolution. As far as the app is concerned it&#39;s rendering to a fullscreen window at the requested res, but then Wayland scales the offscreen buffer and blits it to the screen. If the window loses focus then it&#39;s minimized. (I know we are sort of stumbling onto WM territory here, I&#39;m not really sure how to handle that. Perhaps it doesn&#39;t need to be minimized just displayed non-fullscreen).<br>
<br>Sorry if I&#39;m talking rubbish, I only have basically knowledge of how this stuff works.<br><br></div></div>Luke.<br>