shell: Always go to original mode when focused window not fullscreen
authorAlexander Larsson <alexl@redhat.com>
Tue, 28 May 2013 14:23:39 +0000 (16:23 +0200)
committerKristian Høgsberg <krh@bitplanet.net>
Tue, 28 May 2013 21:22:01 +0000 (17:22 -0400)
commitf82b6cac5e8f87ab156861d61f7de8313e16132a
tree6c74c410e3161ad8433396446a188ed67ba35687
parent355748e3b5db5d6d4de55095a2b5f5ec86c95a38
shell: Always go to original mode when focused window not fullscreen

Right now we only switch mode on activating a fullscreened window.
This has several problems:

* Once you're in fullscreen its hard to switch to a non-fullscreened
  window with alt-tab as you stay in the small resolution.
* If you switch from a fullscreened window to a non-fullscreened
  window and the fullscreened window is destroyed we will not
  restore the original mode (since the window is not
  shell_surface_is_top_fullscreen()
* Its hard to reach a different output on the right with the mouse
  when the mode is smaller that the original, as there is a "gap"
  between the two outputs. So, if you alt-tab to another window
  you can not always reach it.

This is somewhat of a sledge hammer, as it means you can't e.g.
focus a non-fullscreen on one output and have a window fullscreened
on another output. However, trying to restore only the outputs
the new window is on is problematic:

* It may later change output
* We want to see all windows anyway during alt-tab
* Can't reach the other windows with the mouse anyway

So, this seems like an ok solution.
src/shell.c