all: Massive change: new way for window management, use frame

This commit is contained in:
Martin Duquesnoy
2008-11-08 20:32:11 +01:00
parent 0da49d84b4
commit ba425f172f
14 changed files with 374 additions and 367 deletions

View File

@@ -49,7 +49,7 @@ init(void)
grabkeys();
/* Warning about font */
if(conf.titlebar.height < font->height)
if(TBARH + BORDH < font->height)
fprintf(stderr, "WMFS Warning: Font too big, can't draw any text in the titlebar.\n");
return;
@@ -122,7 +122,6 @@ init_root(void)
SubstructureRedirectMask | SubstructureNotifyMask |
EnterWindowMask | LeaveWindowMask | StructureNotifyMask ;
at.cursor = cursor[CurNormal];
at.override_redirect = 1;
XChangeWindowAttributes(dpy, root, CWEventMask | CWCursor, &at);
if(conf.root.background_command)
uicb_spawn(conf.root.background_command);
@@ -133,18 +132,16 @@ init_root(void)
void
init_geometry(void)
{
sgeo.y = sgeo.x = 0;
sgeo.x = BORDH;
sgeo.y = infobar.geo.height;
if(conf.bartop)
sgeo.y = (conf.titlebar.pos)
? infobar.geo.height
: infobar.geo.height + conf.titlebar.height;
sgeo.y += TBARH;
else
if(conf.titlebar.pos)
sgeo.y = conf.titlebar.height;
sgeo.y = TBARH;
sgeo.width = MAXW;
sgeo.height = MAXH - (infobar.geo.height + conf.titlebar.height);
sgeo.height = MAXH - infobar.geo.height - TBARH;
return;
}