menu: fix appicon menu hit detection and edge scrolling during drag
- findMenu(): add icon_menu to the walk list so the appicon right-click menu responds to pointer motion during its modal drag loop. - dragScrollMenuCallback: remove the scrollable_menus gate so menus scroll at screen edges during drag-select regardless of the scrollable_menus preference (that preference controls the non-modal scroll path in handleMotionNotify which does not run during the menu modal loop).
This commit is contained in:
parent
7114da35ba
commit
611a886582
17
src/menu.c
17
src/menu.c
|
|
@ -1149,13 +1149,14 @@ static WMenu *findMenu(WScreen * scr, int *x_ret, int *y_ret)
|
|||
|
||||
wm_backend->pointer_get_position(&x, &y);
|
||||
|
||||
findMenuWalk(scr->root_menu, x, y, &deepest, &dx, &dy);
|
||||
findMenuWalk(scr->switch_menu, x, y, &deepest, &dx, &dy);
|
||||
findMenuWalk(scr->window_menu, x, y, &deepest, &dx, &dy);
|
||||
findMenuWalk(scr->dock ? scr->dock->menu : NULL,
|
||||
x, y, &deepest, &dx, &dy);
|
||||
findMenuWalk(scr->clip_menu, x, y, &deepest, &dx, &dy);
|
||||
findMenuWalk(scr->dock_pos_menu, x, y, &deepest, &dx, &dy);
|
||||
findMenuWalk(scr->root_menu, x, y, &deepest, &dx, &dy);
|
||||
findMenuWalk(scr->switch_menu, x, y, &deepest, &dx, &dy);
|
||||
findMenuWalk(scr->window_menu, x, y, &deepest, &dx, &dy);
|
||||
findMenuWalk(scr->dock ? scr->dock->menu : NULL,
|
||||
x, y, &deepest, &dx, &dy);
|
||||
findMenuWalk(scr->clip_menu, x, y, &deepest, &dx, &dy);
|
||||
findMenuWalk(scr->dock_pos_menu, x, y, &deepest, &dx, &dy);
|
||||
findMenuWalk(scr->icon_menu, x, y, &deepest, &dx, &dy);
|
||||
|
||||
if (deepest) {
|
||||
*x_ret = dx;
|
||||
|
|
@ -1697,7 +1698,7 @@ static void menuMouseDown(WObjDescriptor * desc, WBackendEvent * event)
|
|||
}
|
||||
}
|
||||
|
||||
if (!wPreferences.wrap_menus && !wPreferences.scrollable_menus) {
|
||||
if (!wPreferences.wrap_menus) {
|
||||
if (!menu->timer)
|
||||
dragScrollMenuCallback(menu);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue