Test
This commit is contained in:
parent
7fbd1c5ed0
commit
09c13122cc
7
xmenu.c
7
xmenu.c
|
@ -345,6 +345,7 @@ static void
|
||||||
calcmenu(struct Menu *menu)
|
calcmenu(struct Menu *menu)
|
||||||
{
|
{
|
||||||
XWindowChanges changes;
|
XWindowChanges changes;
|
||||||
|
XSizeHints sizeh;
|
||||||
struct Item *item;
|
struct Item *item;
|
||||||
|
|
||||||
/* calculate items positions and menu height */
|
/* calculate items positions and menu height */
|
||||||
|
@ -392,6 +393,12 @@ calcmenu(struct Menu *menu)
|
||||||
changes.y = menu->y;
|
changes.y = menu->y;
|
||||||
XConfigureWindow(dpy, menu->win, CWHeight | CWX | CWY, &changes);
|
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 */
|
/* calculate positions of submenus */
|
||||||
for (item = menu->list; item != NULL; item = item->next) {
|
for (item = menu->list; item != NULL; item = item->next) {
|
||||||
if (item->submenu != NULL)
|
if (item->submenu != NULL)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user