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

Fix menu positioning bug

Here I tried to prevent the menu of windows to be displayed in the
other side of the screen if the window is half present in the screen
horizontally (ie x < 0)

a worse problem with menu is that it disappears when
the window is half present in the window vertically
ie y < 0, that makes it not usable.
This commit is contained in:
Samir SAADA
2009-05-29 20:39:41 +02:00
committed by Carlos R. Mafra
parent 6b08fc9e78
commit d316260395

View File

@@ -1165,8 +1165,8 @@ wMenuMapAt(WMenu *menu, int x, int y, int keyboard)
}
XMoveWindow(dpy, menu->frame->core->window, x, y);
menu->frame_x = x;
menu->frame_y = y;
menu->frame_x = (x<0) ? 0 : x;
menu->frame_y = (y<0) ? 0 : y;
XMapWindow(dpy, menu->frame->core->window);
wRaiseFrame(menu->frame->core);
menu->flags.mapped = 1;