1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 20:38:08 +01:00

- 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.
This commit is contained in:
dan
2002-09-12 03:43:08 +00:00
parent a07b262a87
commit 3fc803c0d8
2 changed files with 11 additions and 3 deletions

View File

@@ -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" <m.c.p@wolk-project.de>)
the root menu (sent by "Marc-Christian Petersen" <m.c.p@wolk-project.de>)
- 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:

View File

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