1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-18 12:00:31 +01:00

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
2023-01-19 02:55:00 +00:00
committed by Carlos R. Mafra
parent 515eb652c7
commit 10c36d244e

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);