Fix focus issues with the switch panel and auto-focus
commit3f7110b120e8b57048a363e1b933ef4db6a14cb9
authorDaniel Déchelotte <yo.dan@free.fr>
Tue, 18 Aug 2009 22:50:49 +0000 (19 00:50 +0200)
committerCarlos R. Mafra <crmafra@gmail.com>
Thu, 20 Aug 2009 20:07:10 +0000 (20 22:07 +0200)
treea8c335093425d2b20070e9972f93cf1e035c07ae
parentf9bb2a428a52ee6aba07d160412478744c805751
Fix focus issues with the switch panel and auto-focus

1. Setup two windows in a workspace, one at the center and the
   other at a corner. Move the mouse to the center of the screen, so
   that the focus goes to the center window. Now, with the help of the
   keyboard (with Alt-tab, typically), try and switch the focus to the
   other window. In doing so, the switch panel shows up, gives the
   focus to the other window and then disappears. However, its
   disappearance make it seem to wmaker that the mouse has just
   entered the center window, so wmaker gives the focus to that
   window again.

   2. It is a lit bit more involved. "Raise window when switching
   focus with keyboard" needs to be set. In a given workspace, maximize
   a first window A, then setup "above" window A two windows B and C
   (one in the upper left corner and the other one in the lower right
   corner, for example). Move the mouse so as to give the focus to
   window B. Press the Alt key, hit the key tab once (window A moves
   up to the "top"), then another time (window C is then selected).
   Eventually relase the Alt key: window B is given the focus again.

Correction: it is a matter of ignoring some (EnterNotify) events
when the switch panel is active or has just been used.
src/cycling.c
src/event.c
src/main.c
src/startup.c
src/switchpanel.c