diff --git a/ChangeLog b/ChangeLog index 9e92c29a..88fbf159 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,7 +3,9 @@ Changes since version 0.80.1: - Some updates to WINGs WMConnection. See WINGs/ChangeLog for details. - Fixed empty window list menu, if the window list menu was launched through - the root menu ("Marc-Christian Petersen" ) + the root menu (sent by "Marc-Christian Petersen" ) +- Fixed dock's menu mapping position when dock is on the right side. +- Map clip's menu so that it never gets out of screen on the left or the right. Changes since version 0.80.0: diff --git a/src/dock.c b/src/dock.c index 8a61545e..1791e079 100644 --- a/src/dock.c +++ b/src/dock.c @@ -3520,10 +3520,16 @@ openDockMenu(WDock *dock, WAppIcon *aicon, XEvent *event) wMenuRealize(dock->menu); if (dock->type == WM_CLIP) { - x_pos = event->xbutton.x_root+2; + /*x_pos = event->xbutton.x_root+2;*/ + x_pos = event->xbutton.x_root - dock->menu->frame->core->width/2 - 1; + if (x_pos < 0) { + x_pos = 0; + } else if (x_pos + dock->menu->frame->core->width > scr->scr_width-2) { + 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 - 2 : 0; + scr->scr_width - dock->menu->frame->core->width - 3 : 0; } wMenuMapAt(dock->menu, x_pos, event->xbutton.y_root+2, False);