diff --git a/xmenu.c b/xmenu.c index e3588fd..d02620a 100644 --- a/xmenu.c +++ b/xmenu.c @@ -345,6 +345,7 @@ static void calcmenu(struct Menu *menu) { XWindowChanges changes; + XSizeHints sizeh; struct Item *item; /* calculate items positions and menu height */ @@ -392,6 +393,12 @@ calcmenu(struct Menu *menu) changes.y = menu->y; XConfigureWindow(dpy, menu->win, CWHeight | CWX | CWY, &changes); + /* set window manager size hints */ + sizeh.flags = PMaxSize | PMinSize; + sizeh.min_width = sizeh.max_width = menu->w; + sizeh.min_height = sizeh.max_height = menu->h; + XSetWMNormalHints(dpy, menu->win, &sizeh); + /* calculate positions of submenus */ for (item = menu->list; item != NULL; item = item->next) { if (item->submenu != NULL) diff --git a/xmenu.sh b/xmenu.sh index e3f3279..c6a2188 100755 --- a/xmenu.sh +++ b/xmenu.sh @@ -1,6 +1,6 @@ #!/bin/sh -cat <