mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
remove initlayout function
This commit is contained in:
parent
02bd4f8974
commit
2eaadb39e7
4 changed files with 9 additions and 20 deletions
12
config.c
12
config.c
|
@ -17,6 +17,8 @@
|
|||
#include "layouts/spiral.h"
|
||||
#include "layouts/floating.h"
|
||||
|
||||
int blw = 0;
|
||||
|
||||
/* static */
|
||||
static void initfont(const char *, Display *, DC *);
|
||||
static unsigned long initcolor(const char *colstr, Display *, int);
|
||||
|
@ -195,6 +197,9 @@ parse_config(Display * disp, int scr, DC * drawcontext, jdwm_config *jdwmconf)
|
|||
eprint("error parsing configuration file at line %d: %s\n",
|
||||
config_error_line(&jdwmlibconf), config_error_text(&jdwmlibconf));
|
||||
|
||||
/* font */
|
||||
initfont(config_lookup_string(&jdwmlibconf, "jdwm.font"), disp, drawcontext);
|
||||
|
||||
/* layouts */
|
||||
conflayouts = config_lookup(&jdwmlibconf, "jdwm.layouts");
|
||||
|
||||
|
@ -210,6 +215,10 @@ parse_config(Display * disp, int scr, DC * drawcontext, jdwm_config *jdwmconf)
|
|||
name_func_lookup(config_setting_get_string_elem(confsublayouts, 1), LayoutsList);
|
||||
if(!jdwmconf->layouts[i].arrange)
|
||||
eprint("unknown layout in configuration file\n");
|
||||
|
||||
j = textw(jdwmconf->layouts[i].symbol);
|
||||
if(j > blw)
|
||||
blw = j;
|
||||
}
|
||||
|
||||
jdwmconf->layouts[i].symbol = NULL;
|
||||
|
@ -315,9 +324,6 @@ parse_config(Display * disp, int scr, DC * drawcontext, jdwm_config *jdwmconf)
|
|||
/* mwfact */
|
||||
jdwmconf->mwfact = config_lookup_float(&jdwmlibconf, "jdwm.mwfact");
|
||||
|
||||
/* font */
|
||||
initfont(config_lookup_string(&jdwmlibconf, "jdwm.font"), disp, drawcontext);
|
||||
|
||||
/* colors */
|
||||
dc.norm[ColBorder] = initcolor(config_lookup_string(&jdwmlibconf, "jdwm.normal_border_color"),
|
||||
disp, scr);
|
||||
|
|
1
jdwm.c
1
jdwm.c
|
@ -174,7 +174,6 @@ setup(Display *disp, jdwm_config *jdwmconf)
|
|||
sx = sy = 0;
|
||||
sw = DisplayWidth(disp, screen);
|
||||
sh = DisplayHeight(disp, screen);
|
||||
initlayouts(jdwmconf);
|
||||
/* bar */
|
||||
dc.h = bh = dc.font.height + 2;
|
||||
wa.override_redirect = 1;
|
||||
|
|
15
layout.c
15
layout.c
|
@ -10,8 +10,6 @@
|
|||
#include "layouts/floating.h"
|
||||
#include "util.h"
|
||||
|
||||
int blw = 0;
|
||||
|
||||
/* extern */
|
||||
extern int wax, way, wah, waw; /* windowarea geometry */
|
||||
extern Window barwin;
|
||||
|
@ -75,19 +73,6 @@ uicb_focusprev(Display *disp __attribute__ ((unused)),
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
initlayouts(jdwm_config * jdwmconf)
|
||||
{
|
||||
int w, i;
|
||||
|
||||
for(blw = i = 0; i < jdwmconf->nlayouts; i++)
|
||||
{
|
||||
w = textw(jdwmconf->layouts[i].symbol);
|
||||
if(w > blw)
|
||||
blw = w;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
loadjdwmprops(Display *disp, jdwm_config * jdwmconf)
|
||||
{
|
||||
|
|
1
layout.h
1
layout.h
|
@ -9,7 +9,6 @@
|
|||
#define IS_ARRANGE(layout) (layout == jdwmconf->current_layout->arrange)
|
||||
|
||||
void arrange(Display *, jdwm_config *); /* arranges all windows depending on the layout in use */
|
||||
void initlayouts(jdwm_config *); /* initialize layout array */
|
||||
void restack(Display *, jdwm_config *); /* restores z layers of all clients */
|
||||
void uicb_focusnext(Display *, jdwm_config *, const char *); /* focuses next visible client */
|
||||
void uicb_focusprev(Display *, jdwm_config *, const char *); /* focuses prev visible client */
|
||||
|
|
Loading…
Reference in a new issue