mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
calculate proper menu width/height on the first Expose event; 'jump' (while using gap) noticed by Christian Neukirchen
This commit is contained in:
parent
376e98c2c8
commit
2843ba1e28
4
menu.c
4
menu.c
@ -392,13 +392,13 @@ menu_draw(struct menu_ctx *mc, struct menu_q *menuq, struct menu_q *resultq)
|
|||||||
mc->x = xine.w - mc->width;
|
mc->x = xine.w - mc->width;
|
||||||
if (mc->x < xine.x) {
|
if (mc->x < xine.x) {
|
||||||
mc->x = xine.x;
|
mc->x = xine.x;
|
||||||
mc->width = xine.w - xine.x;
|
mc->width = MIN(mc->width, (xine.w - xine.x));
|
||||||
}
|
}
|
||||||
if (mc->y + mc->height >= xine.h)
|
if (mc->y + mc->height >= xine.h)
|
||||||
mc->y = xine.h - mc->height;
|
mc->y = xine.h - mc->height;
|
||||||
if (mc->y < xine.y) {
|
if (mc->y < xine.y) {
|
||||||
mc->y = xine.y;
|
mc->y = xine.y;
|
||||||
mc->height = xine.h - xine.y;
|
mc->height = MIN(mc->height, (xine.h - xine.y));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mc->x != xsave || mc->y != ysave)
|
if (mc->x != xsave || mc->y != ysave)
|
||||||
|
Loading…
Reference in New Issue
Block a user