mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-22 14:08:06 +01:00
Also relaunch from appicon with Ctrl + DblClick.
Zoltan Balaton points out that Control + Doubleclick on docked app will launch a new instance. For consistency with that behaviour we now allow Control + Doubleclick on an undocked appicon to invoke the new relaunching functionality. We also now restrict doubleclick handling to the left mouse button in order to avoid relaunching the application twice when the middle button is used.
This commit is contained in:
committed by
Carlos R. Mafra
parent
51c9f2a852
commit
056a290a7d
@@ -497,8 +497,13 @@ static void iconDblClick(WObjDescriptor * desc, XEvent * event)
|
||||
assert(aicon->icon->owner != NULL);
|
||||
|
||||
wapp = wApplicationOf(aicon->icon->owner->main_window);
|
||||
unhideHere = (event->xbutton.state & ShiftMask);
|
||||
|
||||
if (event->xbutton.state & ControlMask) {
|
||||
relaunchApplication(wapp);
|
||||
return;
|
||||
}
|
||||
|
||||
unhideHere = (event->xbutton.state & ShiftMask);
|
||||
/* go to the last workspace that the user worked on the app */
|
||||
if (!unhideHere && wapp->last_workspace != scr->current_workspace)
|
||||
wWorkspaceChange(scr, wapp->last_workspace);
|
||||
@@ -535,7 +540,9 @@ void appIconMouseDown(WObjDescriptor * desc, XEvent * event)
|
||||
return;
|
||||
|
||||
if (IsDoubleClick(scr, event)) {
|
||||
iconDblClick(desc, event);
|
||||
/* Middle or right mouse actions were handled on first click */
|
||||
if (event->xbutton.button == Button1)
|
||||
iconDblClick(desc, event);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user