From 10c36d244e7a9a080c2a5f1c082742619694163f Mon Sep 17 00:00:00 2001 From: "Torrance, Douglas" Date: Thu, 19 Jan 2023 02:55:00 +0000 Subject: [PATCH] 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". --- src/dock.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/dock.c b/src/dock.c index 99e05f61..f757a344 100644 --- a/src/dock.c +++ b/src/dock.c @@ -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);