mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-26 16:32:30 +01:00
swpanel: Fix focus issue when alt-tabbing
The problem was the following. While alt-tabbing from one window to a xterm, wait for the xterm to be raised but keep the alt key pressed. Now move the mouse cursor over the xterm and release the alt key. The result is a xterm in a zoombie focused state; its titlebar has the focused color but xterm itself is not focused and does not accept any input. Fix this by reinstating the check for a NULL pointer from wSwitchPanelHandleEvent() before changing focus. That function detects if the mouse cursor moved over to the same window which is currently being pointed out by the switchpanel, and returns NULL in this case (the check for panel->current != focus fails). Thanks to Paul Harris for reporting it!
This commit is contained in:
@@ -221,12 +221,17 @@ void StartWindozeCycle(WWindow * wwin, XEvent * event, Bool next, Bool class_onl
|
||||
case MotionNotify:
|
||||
|
||||
case ButtonRelease:
|
||||
{
|
||||
WWindow *tmp;
|
||||
tmp = wSwitchPanelHandleEvent(swpanel, &ev);
|
||||
if (tmp) {
|
||||
newFocused = tmp;
|
||||
oldFocused = change_focus_and_raise(newFocused, oldFocused, swpanel, scr, False);
|
||||
|
||||
newFocused = wSwitchPanelHandleEvent(swpanel, &ev);
|
||||
oldFocused = change_focus_and_raise(newFocused, oldFocused, swpanel, scr, False);
|
||||
|
||||
if (ev.type == ButtonRelease)
|
||||
done = True;
|
||||
if (ev.type == ButtonRelease)
|
||||
done = True;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user