mirror of
https://github.com/gryf/wmaker.git
synced 2026-02-15 13:35:53 +01:00
enhacnced mouse alt-tabbing
This commit is contained in:
@@ -124,8 +124,7 @@ StartWindozeCycle(WWindow *wwin, XEvent *event, Bool next)
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
WMMaskEvent(dpy, KeyPressMask|KeyReleaseMask|ExposureMask
|
WMMaskEvent(dpy, KeyPressMask|KeyReleaseMask|ExposureMask
|
||||||
|PointerMotionMask|EnterWindowMask|LeaveWindowMask
|
|PointerMotionMask|ButtonReleaseMask, &ev);
|
||||||
|ButtonReleaseMask, &ev);
|
|
||||||
|
|
||||||
/* ignore CapsLock */
|
/* ignore CapsLock */
|
||||||
modifiers = ev.xkey.state & ValidModMask;
|
modifiers = ev.xkey.state & ValidModMask;
|
||||||
@@ -201,15 +200,14 @@ StartWindozeCycle(WWindow *wwin, XEvent *event, Bool next)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EnterNotify:
|
case MotionNotify:
|
||||||
case LeaveNotify:
|
|
||||||
case ButtonRelease:
|
case ButtonRelease:
|
||||||
{
|
{
|
||||||
WWindow *tmp;
|
WWindow *tmp;
|
||||||
if (swpanel) {
|
if (swpanel) {
|
||||||
tmp = wSwitchPanelHandleEvent(swpanel, &ev);
|
tmp = wSwitchPanelHandleEvent(swpanel, &ev);
|
||||||
if (tmp) {
|
if (tmp && tmp != newFocused) {
|
||||||
newFocused = tmp;
|
newFocused = tmp;
|
||||||
wWindowFocus(newFocused, oldFocused);
|
wWindowFocus(newFocused, oldFocused);
|
||||||
oldFocused = newFocused;
|
oldFocused = newFocused;
|
||||||
|
|||||||
@@ -469,22 +469,28 @@ WWindow *wSwitchPanelHandleEvent(WSwitchPanel *panel, XEvent *event)
|
|||||||
if (!panel->win)
|
if (!panel->win)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (event->type == EnterNotify) {
|
if (event->type == MotionNotify) {
|
||||||
int focus= -1;
|
int focus= -1;
|
||||||
|
|
||||||
WM_ITERATE_ARRAY(panel->icons, label, i) {
|
WM_ITERATE_ARRAY(panel->icons, label, i) {
|
||||||
if (WMWidgetXID(label) == event->xcrossing.window) {
|
if (WMWidgetXID(label) == event->xmotion.window) {
|
||||||
focus= i;
|
focus= i;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (focus >= 0) {
|
if (focus >= 0) {
|
||||||
|
WWindow *wwin;
|
||||||
|
|
||||||
changeImage(panel, panel->current, 0);
|
changeImage(panel, panel->current, 0);
|
||||||
changeImage(panel, focus, 1);
|
changeImage(panel, focus, 1);
|
||||||
panel->current= focus;
|
panel->current= focus;
|
||||||
|
|
||||||
return WMGetFromArray(panel->windows, focus);
|
wwin= WMGetFromArray(panel->windows, focus);
|
||||||
|
|
||||||
|
WMSetLabelText(panel->label, wwin->frame->title);
|
||||||
|
|
||||||
|
return wwin;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user