mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-16 07:47:22 +01:00
Remove globalconf.colors
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
ebcda492a1
commit
6826e5dfc4
4 changed files with 6 additions and 37 deletions
18
awesome.c
18
awesome.c
|
@ -303,8 +303,7 @@ int
|
|||
main(int argc, char **argv)
|
||||
{
|
||||
char *confpath = NULL;
|
||||
int xfd, i, opt, colors_nbr;
|
||||
xcolor_init_request_t colors_reqs[2];
|
||||
int xfd, i, opt;
|
||||
ssize_t cmdlen = 1;
|
||||
xdgHandle xdg;
|
||||
bool no_argb = false;
|
||||
|
@ -484,18 +483,9 @@ main(int argc, char **argv)
|
|||
/* init screens information */
|
||||
screen_scan();
|
||||
|
||||
/* init default font and colors */
|
||||
colors_reqs[0] = xcolor_init_unchecked(&globalconf.colors.fg,
|
||||
"#000000", sizeof("#000000") - 1);
|
||||
|
||||
colors_reqs[1] = xcolor_init_unchecked(&globalconf.colors.bg,
|
||||
"#ffffff", sizeof("#ffffff") - 1);
|
||||
|
||||
/* init default font */
|
||||
globalconf.font = font_new("sans 8");
|
||||
|
||||
for(colors_nbr = 0; colors_nbr < 2; colors_nbr++)
|
||||
xcolor_init_reply(colors_reqs[colors_nbr]);
|
||||
|
||||
xutil_lock_mask_get(globalconf.connection, xmapping_cookie,
|
||||
globalconf.keysyms, &globalconf.numlockmask,
|
||||
&globalconf.shiftlockmask, &globalconf.capslockmask,
|
||||
|
@ -519,8 +509,8 @@ main(int argc, char **argv)
|
|||
XCB_CW_BACK_PIXEL | XCB_CW_BORDER_PIXEL | XCB_CW_COLORMAP,
|
||||
(const uint32_t [])
|
||||
{
|
||||
globalconf.colors.bg.pixel,
|
||||
globalconf.colors.bg.pixel,
|
||||
globalconf.screen->black_pixel,
|
||||
globalconf.screen->black_pixel,
|
||||
globalconf.default_cmap
|
||||
});
|
||||
xcb_create_gc(globalconf.connection, globalconf.gc, tmp_win, XCB_GC_FOREGROUND | XCB_GC_BACKGROUND,
|
||||
|
|
|
@ -75,11 +75,6 @@ typedef struct
|
|||
client_array_t stack;
|
||||
/** Lua VM state */
|
||||
lua_State *L;
|
||||
/** Default colors */
|
||||
struct
|
||||
{
|
||||
xcolor_t fg, bg;
|
||||
} colors;
|
||||
/** Default font */
|
||||
font_t *font;
|
||||
/** The event loop */
|
||||
|
|
16
luaa.c
16
luaa.c
|
@ -400,10 +400,6 @@ luaA_awesome_index(lua_State *L)
|
|||
lua_pushnumber(L, globalconf.font->height);
|
||||
else if(a_strcmp(buf, "conffile") == 0)
|
||||
lua_pushstring(L, conffile);
|
||||
else if(a_strcmp(buf, "fg") == 0)
|
||||
luaA_pushxcolor(L, globalconf.colors.fg);
|
||||
else if(a_strcmp(buf, "bg") == 0)
|
||||
luaA_pushxcolor(L, globalconf.colors.bg);
|
||||
else if(a_strcmp(buf, "version") == 0)
|
||||
lua_pushliteral(L, AWESOME_VERSION);
|
||||
else if(a_strcmp(buf, "release") == 0)
|
||||
|
@ -432,18 +428,6 @@ luaA_awesome_newindex(lua_State *L)
|
|||
font_delete(&globalconf.font);
|
||||
globalconf.font = font_new(newfont);
|
||||
}
|
||||
else if(a_strcmp(buf, "fg") == 0)
|
||||
{
|
||||
size_t len;
|
||||
if((buf = luaL_checklstring(L, 3, &len)))
|
||||
xcolor_init_reply(xcolor_init_unchecked(&globalconf.colors.fg, buf, len));
|
||||
}
|
||||
else if(a_strcmp(buf, "bg") == 0)
|
||||
{
|
||||
size_t len;
|
||||
if((buf = luaL_checklstring(L, 3, &len)))
|
||||
xcolor_init_reply(xcolor_init_unchecked(&globalconf.colors.bg, buf, len));
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -435,8 +435,8 @@ client_manage(xcb_window_t w, xcb_get_geometry_reply_t *wgeom, bool startup)
|
|||
| XCB_CW_COLORMAP,
|
||||
(const uint32_t [])
|
||||
{
|
||||
globalconf.colors.bg.pixel,
|
||||
globalconf.colors.bg.pixel,
|
||||
globalconf.screen->black_pixel,
|
||||
globalconf.screen->black_pixel,
|
||||
XCB_GRAVITY_NORTH_WEST,
|
||||
XCB_GRAVITY_NORTH_WEST,
|
||||
1,
|
||||
|
|
Loading…
Reference in a new issue