mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 12:58:08 +01:00
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.
This commit is contained in:
committed by
Carlos R. Mafra
parent
f9bb2a428a
commit
3f7110b120
@@ -85,6 +85,7 @@ extern Atom _XA_GNUSTEP_WM_MINIATURIZE_WINDOW;
|
||||
extern Atom _XA_GNUSTEP_TITLEBAR_STATE;
|
||||
extern Atom _XA_WINDOWMAKER_WM_FUNCTION;
|
||||
extern Atom _XA_WINDOWMAKER_COMMAND;
|
||||
extern Atom _XA_WM_IGNORE_FOCUS_EVENTS;
|
||||
|
||||
#ifdef SHAPE
|
||||
extern Bool wShapeSupported;
|
||||
@@ -1008,6 +1009,11 @@ static void handleClientMessage(XEvent * event)
|
||||
wFrameWindowChangeState(wwin->frame, WS_FOCUSED);
|
||||
break;
|
||||
}
|
||||
} else if (event->xclient.message_type == _XA_WM_IGNORE_FOCUS_EVENTS) {
|
||||
WScreen *scr = wScreenSearchForRootWindow(event->xclient.window);
|
||||
if (!scr)
|
||||
return;
|
||||
scr->flags.ignore_focus_events = event->xclient.data.l[0] ? 1 : 0;
|
||||
#ifdef NETWM_HINTS
|
||||
} else if (wNETWMProcessClientMessage(&event->xclient)) {
|
||||
/* do nothing */
|
||||
|
||||
Reference in New Issue
Block a user