Use dock's position to determine position of dock menu

Previously, we assumed that if the dock was on the right, then the
menu should be on the far right of the entire screen, but this is no
longer the case with "KeepDockOnPrimaryHead" set to "YES".
This commit is contained in:
Torrance, Douglas authored and Carlos R. Mafra committed 2023-01-20 10:34:36 +00:00
1 parent 515eb652c7
commit 10c36d244e
1 file changed
+4 -1
+4 -1
View File
@@ -3622,7 +3622,10 @@ static void openDockMenu(WDock *dock, WAppIcon *aicon, XEvent *event)
x_pos = scr->scr_width - dock->menu->frame->core->width - 4;
}
} else {
x_pos = dock->on_right_side ? scr->scr_width - dock->menu->frame->core->width - 3 : 0;
x_pos = dock->x_pos;
if (dock->on_right_side)
x_pos += ICON_SIZE + DOCK_EXTRA_SPACE
- dock->menu->frame->core->width - 3;
}
wMenuMapAt(dock->menu, x_pos, event->xbutton.y_root + 2, False);