event/infobar: Fix status text position in the infobar and put a condition in configurerequest event function
This commit is contained in:
parent
826a74640f
commit
3c7c11fe29
@ -134,7 +134,9 @@ configurerequest(XConfigureRequestEvent *ev)
|
||||
geo.x += BORDH;
|
||||
geo.y += TBARH;
|
||||
/* Resize */
|
||||
client_moveresize(c, geo, True);
|
||||
if((geo.x < MAXW && geo.x > geo.width)
|
||||
&& geo.y < MAXH && geo.y > geo.height)
|
||||
client_moveresize(c, geo, True);
|
||||
}
|
||||
else
|
||||
client_configure(c);
|
||||
|
||||
@ -65,7 +65,6 @@ infobar_init(void)
|
||||
bar_map(infobar->bar);
|
||||
bar_refresh_color(infobar->bar);
|
||||
bar_refresh(infobar->bar);
|
||||
|
||||
XMapSubwindows(dpy, infobar->layout_button->win);
|
||||
|
||||
strcpy(infobar->statustext, "WMFS-" WMFS_VERSION);
|
||||
@ -86,7 +85,7 @@ infobar_draw(void)
|
||||
|
||||
/* Draw status text */
|
||||
draw_text(infobar->bar->dr,
|
||||
MAXW - textw(infobar->statustext),
|
||||
(MAXW - SHADH) - textw(infobar->statustext),
|
||||
font->height,
|
||||
conf.colors.text, 0,
|
||||
infobar->statustext);
|
||||
|
||||
@ -137,6 +137,12 @@ mainloop(void)
|
||||
XNextEvent(dpy, &ev);
|
||||
getevent(ev);
|
||||
}
|
||||
if(sel)
|
||||
printf("x: %d y: %d w: %d, h: %d\n",
|
||||
sel->geo.x,
|
||||
sel->geo.y,
|
||||
sel->geo.width,
|
||||
sel->geo.height);
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user