Wmfs: Use stdbool.h for bool type
This commit is contained in:
parent
56ae367eee
commit
be2c983004
@ -39,7 +39,7 @@
|
|||||||
* \param w BarWindow Width
|
* \param w BarWindow Width
|
||||||
* \param h BarWindow Height
|
* \param h BarWindow Height
|
||||||
* \param color BarWindow color
|
* \param color BarWindow color
|
||||||
* \param entermask Bool for know if the EnterMask mask is needed
|
* \param entermask bool for know if the EnterMask mask is needed
|
||||||
* \return The BarWindow pointer
|
* \return The BarWindow pointer
|
||||||
*/
|
*/
|
||||||
BarWindow*
|
BarWindow*
|
||||||
@ -50,9 +50,9 @@ barwin_create(Window parent,
|
|||||||
int h,
|
int h,
|
||||||
uint bg,
|
uint bg,
|
||||||
char *fg,
|
char *fg,
|
||||||
Bool entermask,
|
bool entermask,
|
||||||
Bool stipple,
|
bool stipple,
|
||||||
Bool border)
|
bool border)
|
||||||
{
|
{
|
||||||
XSetWindowAttributes at;
|
XSetWindowAttributes at;
|
||||||
BarWindow *bw;
|
BarWindow *bw;
|
||||||
|
|||||||
@ -104,7 +104,7 @@ cfactor_geo(Geo geo, int fact[4], int *err)
|
|||||||
*\param ccg Second geo
|
*\param ccg Second geo
|
||||||
*\param p Direction of resizing
|
*\param p Direction of resizing
|
||||||
*/
|
*/
|
||||||
Bool
|
bool
|
||||||
cfactor_parentrow(Geo cg, Geo ccg, Position p)
|
cfactor_parentrow(Geo cg, Geo ccg, Position p)
|
||||||
{
|
{
|
||||||
switch(p)
|
switch(p)
|
||||||
@ -151,7 +151,7 @@ _cfactor_arrange_row(Client *c, Position p, int fac)
|
|||||||
*\param fac Factor of resizing
|
*\param fac Factor of resizing
|
||||||
*\return False in case of error
|
*\return False in case of error
|
||||||
*/
|
*/
|
||||||
static Bool
|
static bool
|
||||||
_cfactor_check_geo_row(Client *c, Position p, int fac)
|
_cfactor_check_geo_row(Client *c, Position p, int fac)
|
||||||
{
|
{
|
||||||
Geo cgeo = c->frame_geo;
|
Geo cgeo = c->frame_geo;
|
||||||
@ -204,7 +204,7 @@ cfactor_arrange_two(Client *c1, Client *c2, Position p, int fac)
|
|||||||
*\param p Direction of resizing
|
*\param p Direction of resizing
|
||||||
*\returm 1/0
|
*\returm 1/0
|
||||||
*/
|
*/
|
||||||
Bool
|
bool
|
||||||
cfactor_check_2pc(Geo g1, Geo g2, Position p)
|
cfactor_check_2pc(Geo g1, Geo g2, Position p)
|
||||||
{
|
{
|
||||||
if(LDIR(p))
|
if(LDIR(p))
|
||||||
@ -239,7 +239,7 @@ cfactor_arrange_row(Client *c, Client *gc, Position p, int fac)
|
|||||||
*\param p Direction of resizing
|
*\param p Direction of resizing
|
||||||
*\param fac Factor of resizing
|
*\param fac Factor of resizing
|
||||||
*/
|
*/
|
||||||
static Bool
|
static bool
|
||||||
cfactor_check_geo(Client *c, Client *g, Position p, int fac)
|
cfactor_check_geo(Client *c, Client *g, Position p, int fac)
|
||||||
{
|
{
|
||||||
int e, ee;
|
int e, ee;
|
||||||
|
|||||||
26
src/client.c
26
src/client.c
@ -246,7 +246,7 @@ client_above(Client *c)
|
|||||||
void
|
void
|
||||||
client_focus(Client *c)
|
client_focus(Client *c)
|
||||||
{
|
{
|
||||||
Bool prevwasmax = False;
|
bool prevwasmax = False;
|
||||||
Client *cc;
|
Client *cc;
|
||||||
|
|
||||||
if(sel && sel != c)
|
if(sel && sel != c)
|
||||||
@ -311,10 +311,10 @@ client_focus(Client *c)
|
|||||||
|
|
||||||
/** Set urgency flag of the client
|
/** Set urgency flag of the client
|
||||||
* \param c Client pointer
|
* \param c Client pointer
|
||||||
* \param u Bool
|
* \param u bool
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
client_urgent(Client *c, Bool u)
|
client_urgent(Client *c, bool u)
|
||||||
{
|
{
|
||||||
FLAGAPPLY(c->flags, u, UrgentFlag);
|
FLAGAPPLY(c->flags, u, UrgentFlag);
|
||||||
FLAGAPPLY(tags[c->screen][c->tag].flags, u, TagUrgentFlag);
|
FLAGAPPLY(tags[c->screen][c->tag].flags, u, TagUrgentFlag);
|
||||||
@ -483,7 +483,7 @@ client_hide(Client *c)
|
|||||||
* \param c Client pointer
|
* \param c Client pointer
|
||||||
* \return True if the client is hide; False if not
|
* \return True if the client is hide; False if not
|
||||||
*/
|
*/
|
||||||
Bool
|
bool
|
||||||
ishide(Client *c, int screen)
|
ishide(Client *c, int screen)
|
||||||
{
|
{
|
||||||
if(c->screen == screen)
|
if(c->screen == screen)
|
||||||
@ -588,8 +588,8 @@ client_set_rules(Client *c)
|
|||||||
ulong n, il;
|
ulong n, il;
|
||||||
uchar *data = NULL;
|
uchar *data = NULL;
|
||||||
char wwrole[256] = { 0 };
|
char wwrole[256] = { 0 };
|
||||||
Bool applied_tag_rule = False;
|
bool applied_tag_rule = False;
|
||||||
Bool applied_screen_rule = False;
|
bool applied_screen_rule = False;
|
||||||
|
|
||||||
memset(&xch, 0, sizeof(xch));
|
memset(&xch, 0, sizeof(xch));
|
||||||
|
|
||||||
@ -679,11 +679,11 @@ client_set_rules(Client *c)
|
|||||||
/** Manage a client with a window and his attributes
|
/** Manage a client with a window and his attributes
|
||||||
* \param w Cient's futur Window
|
* \param w Cient's futur Window
|
||||||
* \param wa XWindowAttributes pointer, Window w attributes
|
* \param wa XWindowAttributes pointer, Window w attributes
|
||||||
* \param ar Do arrange() or not (Bool)
|
* \param ar Do arrange() or not (bool)
|
||||||
* \return The managed client
|
* \return The managed client
|
||||||
*/
|
*/
|
||||||
Client*
|
Client*
|
||||||
client_manage(Window w, XWindowAttributes *wa, Bool ar)
|
client_manage(Window w, XWindowAttributes *wa, bool ar)
|
||||||
{
|
{
|
||||||
Client *c, *t = NULL;
|
Client *c, *t = NULL;
|
||||||
Window trans, dw;
|
Window trans, dw;
|
||||||
@ -862,10 +862,10 @@ client_geo_hints(Geo *geo, Client *c)
|
|||||||
* \param c Client pointer
|
* \param c Client pointer
|
||||||
* \param geo Coordinate info for the future size
|
* \param geo Coordinate info for the future size
|
||||||
* of the client
|
* of the client
|
||||||
* \param r Bool for resize hint or not
|
* \param r bool for resize hint or not
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
client_moveresize(Client *c, Geo geo, Bool r)
|
client_moveresize(Client *c, Geo geo, bool r)
|
||||||
{
|
{
|
||||||
int os, e;
|
int os, e;
|
||||||
int rhx = 0;
|
int rhx = 0;
|
||||||
@ -1158,7 +1158,7 @@ client_focus_next(Client *c)
|
|||||||
void
|
void
|
||||||
client_unmanage(Client *c)
|
client_unmanage(Client *c)
|
||||||
{
|
{
|
||||||
Bool b = False;
|
bool b = False;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
XGrabServer(dpy);
|
XGrabServer(dpy);
|
||||||
@ -1436,7 +1436,7 @@ uicb_clientlist(uicb_t cmd)
|
|||||||
{
|
{
|
||||||
int i, d, u, x, y;
|
int i, d, u, x, y;
|
||||||
int n = 0;
|
int n = 0;
|
||||||
Bool all = False;
|
bool all = False;
|
||||||
Window w;
|
Window w;
|
||||||
Client *c = NULL;
|
Client *c = NULL;
|
||||||
|
|
||||||
@ -1490,7 +1490,7 @@ uicb_clientlist(uicb_t cmd)
|
|||||||
/** Check clientlist menu fake function
|
/** Check clientlist menu fake function
|
||||||
* \param cmd uicb_t type unused
|
* \param cmd uicb_t type unused
|
||||||
*/
|
*/
|
||||||
Bool
|
bool
|
||||||
uicb_checkclist(uicb_t cmd)
|
uicb_checkclist(uicb_t cmd)
|
||||||
{
|
{
|
||||||
(void)cmd;
|
(void)cmd;
|
||||||
|
|||||||
62
src/config.c
62
src/config.c
@ -173,10 +173,10 @@ conf_misc_section(void)
|
|||||||
sec = fetch_section_first(NULL, "misc");
|
sec = fetch_section_first(NULL, "misc");
|
||||||
|
|
||||||
conf.font = fetch_opt_first(sec, "sans-9", "font").str;
|
conf.font = fetch_opt_first(sec, "sans-9", "font").str;
|
||||||
conf.raisefocus = fetch_opt_first(sec, "false", "raisefocus").bool;
|
conf.raisefocus = fetch_opt_first(sec, "false", "raisefocus").boolean;
|
||||||
conf.focus_fmouse = fetch_opt_first(sec, "true", "focus_follow_mouse").bool;
|
conf.focus_fmouse = fetch_opt_first(sec, "true", "focus_follow_mouse").boolean;
|
||||||
conf.focus_fmov = fetch_opt_first(sec, "false", "focus_follow_movement").bool;
|
conf.focus_fmov = fetch_opt_first(sec, "false", "focus_follow_movement").boolean;
|
||||||
conf.focus_pclick = fetch_opt_first(sec, "true", "focus_pointer_click").bool;
|
conf.focus_pclick = fetch_opt_first(sec, "true", "focus_pointer_click").boolean;
|
||||||
conf.status_timing = fetch_opt_first(sec, "1", "status_timing").num;
|
conf.status_timing = fetch_opt_first(sec, "1", "status_timing").num;
|
||||||
conf.status_path = fetch_opt_first(sec, "", "status_path").str;
|
conf.status_path = fetch_opt_first(sec, "", "status_path").str;
|
||||||
conf.autostart_path = fetch_opt_first(sec, "", "autostart_path").str;
|
conf.autostart_path = fetch_opt_first(sec, "", "autostart_path").str;
|
||||||
@ -216,7 +216,7 @@ conf_bar_section(void)
|
|||||||
|
|
||||||
bar = fetch_section_first(NULL, "bar");
|
bar = fetch_section_first(NULL, "bar");
|
||||||
|
|
||||||
conf.border.bar = fetch_opt_first(bar, "false", "border").bool;
|
conf.border.bar = fetch_opt_first(bar, "false", "border").boolean;
|
||||||
conf.bars.height = fetch_opt_first(bar, "-1", "height").num;
|
conf.bars.height = fetch_opt_first(bar, "-1", "height").num;
|
||||||
conf.colors.bar = getcolor((barbg = fetch_opt_first(bar, "#000000", "bg").str));
|
conf.colors.bar = getcolor((barbg = fetch_opt_first(bar, "#000000", "bg").str));
|
||||||
conf.colors.text = fetch_opt_first(bar, "#ffffff", "fg").str;
|
conf.colors.text = fetch_opt_first(bar, "#ffffff", "fg").str;
|
||||||
@ -236,7 +236,7 @@ conf_bar_section(void)
|
|||||||
|
|
||||||
if((systray = fetch_section_first(bar, "systray")))
|
if((systray = fetch_section_first(bar, "systray")))
|
||||||
{
|
{
|
||||||
conf.systray.active = fetch_opt_first(systray, "true", "active").bool;
|
conf.systray.active = fetch_opt_first(systray, "true", "active").boolean;
|
||||||
|
|
||||||
if((conf.systray.screen = fetch_opt_first(systray, "0", "screen").num) < 0
|
if((conf.systray.screen = fetch_opt_first(systray, "0", "screen").num) < 0
|
||||||
|| conf.systray.screen >= sc)
|
|| conf.systray.screen >= sc)
|
||||||
@ -300,27 +300,27 @@ conf_client_section(void)
|
|||||||
|
|
||||||
sec = fetch_section_first(NULL, "client");
|
sec = fetch_section_first(NULL, "client");
|
||||||
|
|
||||||
conf.client_round = fetch_opt_first(sec, "true", "client_round").bool;
|
conf.client_round = fetch_opt_first(sec, "true", "client_round").boolean;
|
||||||
conf.client_auto_center = fetch_opt_first(sec, "false", "client_auto_center").bool;
|
conf.client_auto_center = fetch_opt_first(sec, "false", "client_auto_center").boolean;
|
||||||
conf.client_tile_raise = fetch_opt_first(sec, "false", "client_tile_raise").bool;
|
conf.client_tile_raise = fetch_opt_first(sec, "false", "client_tile_raise").boolean;
|
||||||
|
|
||||||
if ((conf.client.borderheight = fetch_opt_first(sec, "1", "border_height").num) < 1)
|
if ((conf.client.borderheight = fetch_opt_first(sec, "1", "border_height").num) < 1)
|
||||||
conf.client.borderheight = 1;
|
conf.client.borderheight = 1;
|
||||||
|
|
||||||
conf.client.border_shadow = fetch_opt_first(sec, "false", "border_shadow").bool;
|
conf.client.border_shadow = fetch_opt_first(sec, "false", "border_shadow").boolean;
|
||||||
conf.client.place_at_mouse = fetch_opt_first(sec, "false", "place_at_mouse").bool;
|
conf.client.place_at_mouse = fetch_opt_first(sec, "false", "place_at_mouse").boolean;
|
||||||
conf.client.bordernormal = getcolor(fetch_opt_first(sec, "#000000", "border_normal").str);
|
conf.client.bordernormal = getcolor(fetch_opt_first(sec, "#000000", "border_normal").str);
|
||||||
conf.client.borderfocus = getcolor(fetch_opt_first(sec, "#ffffff", "border_focus").str);
|
conf.client.borderfocus = getcolor(fetch_opt_first(sec, "#ffffff", "border_focus").str);
|
||||||
conf.client.resizecorner_normal = getcolor(fetch_opt_first(sec, "#222222", "resize_corner_normal").str);
|
conf.client.resizecorner_normal = getcolor(fetch_opt_first(sec, "#222222", "resize_corner_normal").str);
|
||||||
conf.client.resizecorner_focus = getcolor(fetch_opt_first(sec, "#DDDDDD", "resize_corner_focus").str);
|
conf.client.resizecorner_focus = getcolor(fetch_opt_first(sec, "#DDDDDD", "resize_corner_focus").str);
|
||||||
conf.client.mod |= char_to_modkey(fetch_opt_first(sec, "Alt", "modifier").str, key_list);
|
conf.client.mod |= char_to_modkey(fetch_opt_first(sec, "Alt", "modifier").str, key_list);
|
||||||
conf.client.set_new_win_master = fetch_opt_first(sec, "true", "set_new_win_master").bool;
|
conf.client.set_new_win_master = fetch_opt_first(sec, "true", "set_new_win_master").boolean;
|
||||||
conf.client.padding = fetch_opt_first(sec, "0", "padding").num;
|
conf.client.padding = fetch_opt_first(sec, "0", "padding").num;
|
||||||
conf.client.autofree = fetch_opt_first(sec, "", "autofree").str;
|
conf.client.autofree = fetch_opt_first(sec, "", "autofree").str;
|
||||||
conf.client.automax = fetch_opt_first(sec, "", "automax").str;
|
conf.client.automax = fetch_opt_first(sec, "", "automax").str;
|
||||||
conf.client.default_open_tag = fetch_opt_first(sec, "0", "default_open_tag").num;
|
conf.client.default_open_tag = fetch_opt_first(sec, "0", "default_open_tag").num;
|
||||||
conf.client.default_open_screen = fetch_opt_first(sec, "-1", "default_open_screen").num;
|
conf.client.default_open_screen = fetch_opt_first(sec, "-1", "default_open_screen").num;
|
||||||
conf.client.new_client_get_mouse = fetch_opt_first(sec, "false", "new_client_get_mouse").bool;
|
conf.client.new_client_get_mouse = fetch_opt_first(sec, "false", "new_client_get_mouse").boolean;
|
||||||
|
|
||||||
conf.colors.client_light_shade = fetch_opt_first(sec, "0.25", "light_shade").fnum;
|
conf.colors.client_light_shade = fetch_opt_first(sec, "0.25", "light_shade").fnum;
|
||||||
conf.colors.client_dark_shade = fetch_opt_first(sec, "-0.25", "dark_shade").fnum;
|
conf.colors.client_dark_shade = fetch_opt_first(sec, "-0.25", "dark_shade").fnum;
|
||||||
@ -341,7 +341,7 @@ conf_client_section(void)
|
|||||||
conf.titlebar.fg_normal = fetch_opt_first(titlebar, "#ffffff", "fg_normal").str;
|
conf.titlebar.fg_normal = fetch_opt_first(titlebar, "#ffffff", "fg_normal").str;
|
||||||
conf.titlebar.fg_focus = fetch_opt_first(titlebar, "#000000", "fg_focus").str;
|
conf.titlebar.fg_focus = fetch_opt_first(titlebar, "#000000", "fg_focus").str;
|
||||||
|
|
||||||
conf.titlebar.stipple.active = fetch_opt_first(titlebar, "false", "stipple").bool;
|
conf.titlebar.stipple.active = fetch_opt_first(titlebar, "false", "stipple").boolean;
|
||||||
|
|
||||||
if(!strcmp((p = fetch_opt_first(titlebar, "-1", "stipple_normal").str), "-1"))
|
if(!strcmp((p = fetch_opt_first(titlebar, "-1", "stipple_normal").str), "-1"))
|
||||||
conf.titlebar.stipple.colors.normal = getcolor(conf.titlebar.fg_normal);
|
conf.titlebar.stipple.colors.normal = getcolor(conf.titlebar.fg_normal);
|
||||||
@ -435,10 +435,10 @@ conf_layout_section(void)
|
|||||||
layouts = fetch_section_first(NULL, "layouts");
|
layouts = fetch_section_first(NULL, "layouts");
|
||||||
|
|
||||||
conf.layout_button_width = fetch_opt_first(layouts, "O", "layout_button_width").num;
|
conf.layout_button_width = fetch_opt_first(layouts, "O", "layout_button_width").num;
|
||||||
conf.border.layout = fetch_opt_first(layouts, "false", "border").bool;
|
conf.border.layout = fetch_opt_first(layouts, "false", "border").boolean;
|
||||||
conf.colors.layout_fg = fetch_opt_first(layouts, "#ffffff", "fg").str;
|
conf.colors.layout_fg = fetch_opt_first(layouts, "#ffffff", "fg").str;
|
||||||
conf.colors.layout_bg = getcolor((fetch_opt_first(layouts, "#000000", "bg").str));
|
conf.colors.layout_bg = getcolor((fetch_opt_first(layouts, "#000000", "bg").str));
|
||||||
conf.keep_layout_geo = fetch_opt_first(layouts, "false", "keep_layout_geo").bool;
|
conf.keep_layout_geo = fetch_opt_first(layouts, "false", "keep_layout_geo").boolean;
|
||||||
conf.selected_layout_symbol = fetch_opt_first(layouts, "*", "selected_layout_symbol").str;
|
conf.selected_layout_symbol = fetch_opt_first(layouts, "*", "selected_layout_symbol").str;
|
||||||
|
|
||||||
if((tmp = fetch_opt_first(layouts, "menu", "system").str) && !strcmp(tmp, "menu"))
|
if((tmp = fetch_opt_first(layouts, "menu", "system").str) && !strcmp(tmp, "menu"))
|
||||||
@ -506,17 +506,17 @@ conf_tag_section(void)
|
|||||||
|
|
||||||
sec = fetch_section_first(NULL, "tags");
|
sec = fetch_section_first(NULL, "tags");
|
||||||
|
|
||||||
conf.tag_round = fetch_opt_first(sec, "false", "tag_round").bool;
|
conf.tag_round = fetch_opt_first(sec, "false", "tag_round").boolean;
|
||||||
conf.tag_auto_prev = fetch_opt_first(sec, "true", "tag_auto_prev").bool;
|
conf.tag_auto_prev = fetch_opt_first(sec, "true", "tag_auto_prev").boolean;
|
||||||
conf.colors.tagselfg = fetch_opt_first(sec, "#ffffff", "sel_fg").str;
|
conf.colors.tagselfg = fetch_opt_first(sec, "#ffffff", "sel_fg").str;
|
||||||
conf.colors.tagselbg = getcolor(fetch_opt_first(sec, "#000000", "sel_bg").str);
|
conf.colors.tagselbg = getcolor(fetch_opt_first(sec, "#000000", "sel_bg").str);
|
||||||
conf.colors.tagurfg = fetch_opt_first(sec, "#000000", "urgent_fg").str;
|
conf.colors.tagurfg = fetch_opt_first(sec, "#000000", "urgent_fg").str;
|
||||||
conf.colors.tagurbg = getcolor(fetch_opt_first(sec, "#DD1111", "urgent_bg").str);
|
conf.colors.tagurbg = getcolor(fetch_opt_first(sec, "#DD1111", "urgent_bg").str);
|
||||||
conf.colors.tag_occupied_bg = getcolor(fetch_opt_first(sec, "#222222", "occupied_bg").str);
|
conf.colors.tag_occupied_bg = getcolor(fetch_opt_first(sec, "#222222", "occupied_bg").str);
|
||||||
conf.colors.tag_occupied_fg = fetch_opt_first(sec, conf.colors.text, "occupied_fg").str;
|
conf.colors.tag_occupied_fg = fetch_opt_first(sec, conf.colors.text, "occupied_fg").str;
|
||||||
conf.border.tag = fetch_opt_first(sec, "false", "border").bool;
|
conf.border.tag = fetch_opt_first(sec, "false", "border").boolean;
|
||||||
conf.tagautohide = fetch_opt_first(sec, "false", "autohide").bool;
|
conf.tagautohide = fetch_opt_first(sec, "false", "autohide").boolean;
|
||||||
conf.tagnamecount = fetch_opt_first(sec, "false", "name_count").bool;
|
conf.tagnamecount = fetch_opt_first(sec, "false", "name_count").boolean;
|
||||||
conf.tag_expose_name = fetch_opt_first(sec, "EXPOSE", "expose_name").str;
|
conf.tag_expose_name = fetch_opt_first(sec, "EXPOSE", "expose_name").str;
|
||||||
conf.expose_layout = fetch_opt_first(sec, "tile_grid_vertical", "expose_layout").str;
|
conf.expose_layout = fetch_opt_first(sec, "tile_grid_vertical", "expose_layout").str;
|
||||||
|
|
||||||
@ -553,11 +553,11 @@ conf_tag_section(void)
|
|||||||
};
|
};
|
||||||
|
|
||||||
FLAGAPPLY(default_tag.flags,
|
FLAGAPPLY(default_tag.flags,
|
||||||
fetch_opt_first(def_tag, "false", "resizehint").bool,
|
fetch_opt_first(def_tag, "false", "resizehint").boolean,
|
||||||
ResizeHintFlag);
|
ResizeHintFlag);
|
||||||
|
|
||||||
FLAGAPPLY(default_tag.flags,
|
FLAGAPPLY(default_tag.flags,
|
||||||
fetch_opt_first(def_tag, "false", "split").bool,
|
fetch_opt_first(def_tag, "false", "split").boolean,
|
||||||
(SplitFlag | FirstArrangeFlag));
|
(SplitFlag | FirstArrangeFlag));
|
||||||
|
|
||||||
conf.default_tag = default_tag;
|
conf.default_tag = default_tag;
|
||||||
@ -608,15 +608,15 @@ conf_tag_section(void)
|
|||||||
tags[k][conf.ntag[k]].mwfact = fetch_opt_first(tag[i], fetch_opt_first(def_tag, "0.65", "mwfact").str, "mwfact").fnum;
|
tags[k][conf.ntag[k]].mwfact = fetch_opt_first(tag[i], fetch_opt_first(def_tag, "0.65", "mwfact").str, "mwfact").fnum;
|
||||||
tags[k][conf.ntag[k]].nmaster = fetch_opt_first(tag[i], fetch_opt_first(def_tag, "1", "nmaster").str, "nmaster").num;
|
tags[k][conf.ntag[k]].nmaster = fetch_opt_first(tag[i], fetch_opt_first(def_tag, "1", "nmaster").str, "nmaster").num;
|
||||||
FLAGAPPLY(tags[k][conf.ntag[k]].flags,
|
FLAGAPPLY(tags[k][conf.ntag[k]].flags,
|
||||||
fetch_opt_first(tag[i], fetch_opt_first(def_tag, "false", "resizehint").str, "resizehint").bool,
|
fetch_opt_first(tag[i], fetch_opt_first(def_tag, "false", "resizehint").str, "resizehint").boolean,
|
||||||
ResizeHintFlag);
|
ResizeHintFlag);
|
||||||
|
|
||||||
FLAGAPPLY(tags[k][conf.ntag[k]].flags,
|
FLAGAPPLY(tags[k][conf.ntag[k]].flags,
|
||||||
fetch_opt_first(tag[i], "false", "abovefc").bool,
|
fetch_opt_first(tag[i], "false", "abovefc").boolean,
|
||||||
AboveFCFlag);
|
AboveFCFlag);
|
||||||
|
|
||||||
FLAGAPPLY(tags[k][conf.ntag[k]].flags,
|
FLAGAPPLY(tags[k][conf.ntag[k]].flags,
|
||||||
fetch_opt_first(tag[i], "false", "split").bool,
|
fetch_opt_first(tag[i], "false", "split").boolean,
|
||||||
(SplitFlag | FirstArrangeFlag));
|
(SplitFlag | FirstArrangeFlag));
|
||||||
|
|
||||||
tmp = fetch_opt_first(tag[i], fetch_opt_first(def_tag, "top", "infobar_position").str, "infobar_position").str;
|
tmp = fetch_opt_first(tag[i], fetch_opt_first(def_tag, "top", "infobar_position").str, "infobar_position").str;
|
||||||
@ -682,10 +682,10 @@ conf_rule_section(void)
|
|||||||
conf.rule[i].role = fetch_opt_first(rule[i], "", "role").str;
|
conf.rule[i].role = fetch_opt_first(rule[i], "", "role").str;
|
||||||
conf.rule[i].screen = fetch_opt_first(rule[i], "-1", "screen").num;
|
conf.rule[i].screen = fetch_opt_first(rule[i], "-1", "screen").num;
|
||||||
conf.rule[i].tag = fetch_opt_first(rule[i], "-1", "tag").num;
|
conf.rule[i].tag = fetch_opt_first(rule[i], "-1", "tag").num;
|
||||||
conf.rule[i].free = fetch_opt_first(rule[i], "false", "free").bool;
|
conf.rule[i].free = fetch_opt_first(rule[i], "false", "free").boolean;
|
||||||
conf.rule[i].max = fetch_opt_first(rule[i], "false", "max").bool;
|
conf.rule[i].max = fetch_opt_first(rule[i], "false", "max").boolean;
|
||||||
conf.rule[i].ignoretags = fetch_opt_first(rule[i], "false", "ignoretags").bool;
|
conf.rule[i].ignoretags = fetch_opt_first(rule[i], "false", "ignoretags").boolean;
|
||||||
conf.rule[i].follow_client = fetch_opt_first(rule[i], "false", "follow_client").bool;
|
conf.rule[i].follow_client = fetch_opt_first(rule[i], "false", "follow_client").boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
free(rule);
|
free(rule);
|
||||||
@ -713,7 +713,7 @@ conf_menu_section(void)
|
|||||||
|
|
||||||
conf.menu[i].name = fetch_opt_first(set_menu[i], "menu_wname", "name").str;
|
conf.menu[i].name = fetch_opt_first(set_menu[i], "menu_wname", "name").str;
|
||||||
|
|
||||||
if(!(conf.menu[i].place_at_mouse = fetch_opt_first(set_menu[i], "true", "place_at_mouse").bool))
|
if(!(conf.menu[i].place_at_mouse = fetch_opt_first(set_menu[i], "true", "place_at_mouse").boolean))
|
||||||
{
|
{
|
||||||
conf.menu[i].x = fetch_opt_first(set_menu[i], "0", "x").num;
|
conf.menu[i].x = fetch_opt_first(set_menu[i], "0", "x").num;
|
||||||
conf.menu[i].y = fetch_opt_first(set_menu[i], "0", "y").num;
|
conf.menu[i].y = fetch_opt_first(set_menu[i], "0", "y").num;
|
||||||
|
|||||||
@ -198,7 +198,7 @@ frame_moveresize(Client *c, Geo geo)
|
|||||||
*\param c Client pointer
|
*\param c Client pointer
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
frame_update_color(Client *c, Bool focused)
|
frame_update_color(Client *c, bool focused)
|
||||||
{
|
{
|
||||||
CHECK(c);
|
CHECK(c);
|
||||||
|
|
||||||
|
|||||||
@ -182,9 +182,9 @@ static void
|
|||||||
launcher_execute(Launcher *launcher)
|
launcher_execute(Launcher *launcher)
|
||||||
{
|
{
|
||||||
BarWindow *bw;
|
BarWindow *bw;
|
||||||
Bool found;
|
bool found;
|
||||||
Bool lastwastab = False;
|
bool lastwastab = False;
|
||||||
Bool my_guitar_gently_wheeps = True;
|
bool my_guitar_gently_wheeps = True;
|
||||||
char tmp[32] = { 0 };
|
char tmp[32] = { 0 };
|
||||||
char buf[512] = { 0 };
|
char buf[512] = { 0 };
|
||||||
char tmpbuf[512] = { 0 };
|
char tmpbuf[512] = { 0 };
|
||||||
|
|||||||
20
src/layout.c
20
src/layout.c
@ -35,7 +35,7 @@
|
|||||||
/** Arrange All
|
/** Arrange All
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
arrange(int screen, Bool update_layout)
|
arrange(int screen, bool update_layout)
|
||||||
{
|
{
|
||||||
Client *c;
|
Client *c;
|
||||||
|
|
||||||
@ -102,10 +102,10 @@ freelayout(int screen)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Layout switching function
|
/** Layout switching function
|
||||||
* \param b Bool True : next False : previous
|
* \param b bool True : next False : previous
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
layoutswitch(Bool b)
|
layoutswitch(bool b)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
Client *c;
|
Client *c;
|
||||||
@ -256,7 +256,7 @@ uicb_set_nmaster(uicb_t cmd)
|
|||||||
/** Grid layout function
|
/** Grid layout function
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
grid(int screen, Bool horizontal)
|
grid(int screen, bool horizontal)
|
||||||
{
|
{
|
||||||
Client *c;
|
Client *c;
|
||||||
Geo sg = sgeo[screen];
|
Geo sg = sgeo[screen];
|
||||||
@ -428,7 +428,7 @@ multi_tile(int screen, Position type)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* REMAINDER */
|
/* REMAINDER */
|
||||||
if(i + 1 == n || i + 1 == (n < nmaster ? n : nmaster))
|
if(i + 1 == n || i + 1 == (n < nmaster ? n : nmaster))
|
||||||
{
|
{
|
||||||
if(LDIR(type))
|
if(LDIR(type))
|
||||||
cgeo.height = (sg.y + sg.height) - cgeo.y - BORDH;
|
cgeo.height = (sg.y + sg.height) - cgeo.y - BORDH;
|
||||||
@ -457,7 +457,7 @@ multi_tile(int screen, Position type)
|
|||||||
* \param horizont To specify the mirror mode (vertical/horizontal)
|
* \param horizont To specify the mirror mode (vertical/horizontal)
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
mirror(int screen, Bool horizontal)
|
mirror(int screen, bool horizontal)
|
||||||
{
|
{
|
||||||
Client *c;
|
Client *c;
|
||||||
Geo sg = sgeo[screen];
|
Geo sg = sgeo[screen];
|
||||||
@ -467,7 +467,7 @@ mirror(int screen, Bool horizontal)
|
|||||||
uint i, n, tilesize = 0, mwfact;
|
uint i, n, tilesize = 0, mwfact;
|
||||||
uint nmaster = tags[screen][seltag[screen]].nmaster;
|
uint nmaster = tags[screen][seltag[screen]].nmaster;
|
||||||
int pa, imp;
|
int pa, imp;
|
||||||
Bool isp = False;
|
bool isp = False;
|
||||||
|
|
||||||
memset(nextg, 0, sizeof(nextg));
|
memset(nextg, 0, sizeof(nextg));
|
||||||
|
|
||||||
@ -892,7 +892,7 @@ layout_set_client_master(Client *c)
|
|||||||
/** Check the selected client is max
|
/** Check the selected client is max
|
||||||
* \param cmd uicb_t type unused
|
* \param cmd uicb_t type unused
|
||||||
*/
|
*/
|
||||||
Bool
|
bool
|
||||||
uicb_checkmax(uicb_t cmd)
|
uicb_checkmax(uicb_t cmd)
|
||||||
{
|
{
|
||||||
(void)cmd;
|
(void)cmd;
|
||||||
@ -909,7 +909,7 @@ uicb_checkmax(uicb_t cmd)
|
|||||||
/** Check the selected client is free
|
/** Check the selected client is free
|
||||||
* \param cmd uicb_t type unused
|
* \param cmd uicb_t type unused
|
||||||
*/
|
*/
|
||||||
Bool
|
bool
|
||||||
uicb_checkfree(uicb_t cmd)
|
uicb_checkfree(uicb_t cmd)
|
||||||
{
|
{
|
||||||
(void)cmd;
|
(void)cmd;
|
||||||
@ -926,7 +926,7 @@ uicb_checkfree(uicb_t cmd)
|
|||||||
/** Check layout type
|
/** Check layout type
|
||||||
* \param cmd uicb_t type layout type
|
* \param cmd uicb_t type layout type
|
||||||
*/
|
*/
|
||||||
Bool
|
bool
|
||||||
uicb_checklayout(uicb_t cmd)
|
uicb_checklayout(uicb_t cmd)
|
||||||
{
|
{
|
||||||
screen_get_sel();
|
screen_get_sel();
|
||||||
|
|||||||
@ -44,7 +44,7 @@ menu_get_longer_string(MenuItem *mi, int nitem)
|
|||||||
return l;
|
return l;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Bool
|
static bool
|
||||||
menu_get_checkstring_needed(MenuItem *mi, int nitem)
|
menu_get_checkstring_needed(MenuItem *mi, int nitem)
|
||||||
{
|
{
|
||||||
(void)mi;
|
(void)mi;
|
||||||
@ -83,7 +83,7 @@ menu_draw_item_name(Menu *menu, int item, BarWindow *winitem[], int chcklen)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Bool
|
static bool
|
||||||
menu_activate_item(Menu *menu, int i)
|
menu_activate_item(Menu *menu, int i)
|
||||||
{
|
{
|
||||||
int j, x, y;
|
int j, x, y;
|
||||||
@ -143,12 +143,12 @@ menu_focus_item(Menu *menu, int item, BarWindow *winitem[])
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Bool
|
static bool
|
||||||
menu_manage_event(XEvent *ev, Menu *menu, BarWindow *winitem[])
|
menu_manage_event(XEvent *ev, Menu *menu, BarWindow *winitem[])
|
||||||
{
|
{
|
||||||
int i, c = 0;
|
int i, c = 0;
|
||||||
KeySym ks;
|
KeySym ks;
|
||||||
Bool quit = False;
|
bool quit = False;
|
||||||
char acc = 0;
|
char acc = 0;
|
||||||
|
|
||||||
switch(ev->type)
|
switch(ev->type)
|
||||||
|
|||||||
@ -190,7 +190,7 @@ mouse_move(Client *c)
|
|||||||
while(ev.type != ButtonRelease);
|
while(ev.type != ButtonRelease);
|
||||||
|
|
||||||
/* One time again to delete all the trace on the window */
|
/* One time again to delete all the trace on the window */
|
||||||
if(!(c->flags & TileFlag) && !(c->flags & LMaxFlag))
|
if(!(c->flags & (TileFlag | LMaxFlag)))
|
||||||
{
|
{
|
||||||
mouse_dragborder(geo, gci);
|
mouse_dragborder(geo, gci);
|
||||||
client_moveresize(c, geo, False);
|
client_moveresize(c, geo, False);
|
||||||
@ -330,7 +330,7 @@ mouse_resize(Client *c)
|
|||||||
* \param focused For know if c is or not focused
|
* \param focused For know if c is or not focused
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
mouse_grabbuttons(Client *c, Bool focused)
|
mouse_grabbuttons(Client *c, bool focused)
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
uint but[] = {Button1, Button2, Button3, Button4, Button5};
|
uint but[] = {Button1, Button2, Button3, Button4, Button5};
|
||||||
|
|||||||
@ -70,8 +70,8 @@ struct keyword {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct state {
|
struct state {
|
||||||
bool_t quote;
|
bool quote;
|
||||||
bool_t comment;
|
bool comment;
|
||||||
char quote_char;
|
char quote_char;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -162,7 +162,7 @@ parse_keywords(const char *filename)
|
|||||||
char path[PATH_MAX];
|
char path[PATH_MAX];
|
||||||
size_t i, j;
|
size_t i, j;
|
||||||
int line;
|
int line;
|
||||||
bool_t error = False;
|
bool error = False;
|
||||||
|
|
||||||
|
|
||||||
if ((fd = open(filename, O_RDONLY)) == -1 || stat(filename, &st) == -1) {
|
if ((fd = open(filename, O_RDONLY)) == -1 || stat(filename, &st) == -1) {
|
||||||
|
|||||||
10
src/parse.h
10
src/parse.h
@ -23,17 +23,11 @@
|
|||||||
#define INCLUDE_CMD "@include"
|
#define INCLUDE_CMD "@include"
|
||||||
#define PARSE_MAX_LIST 32
|
#define PARSE_MAX_LIST 32
|
||||||
|
|
||||||
#if defined(Bool)
|
|
||||||
#define bool_t Bool
|
|
||||||
#else
|
|
||||||
typedef enum { False, True } bool_t;
|
|
||||||
#endif /* Bool */
|
|
||||||
|
|
||||||
struct conf_opt {
|
struct conf_opt {
|
||||||
char *name;
|
char *name;
|
||||||
char *val[PARSE_MAX_LIST];
|
char *val[PARSE_MAX_LIST];
|
||||||
size_t nval;
|
size_t nval;
|
||||||
bool_t used;
|
bool used;
|
||||||
int line;
|
int line;
|
||||||
char *filename;
|
char *filename;
|
||||||
SLIST_ENTRY(conf_opt) entry;
|
SLIST_ENTRY(conf_opt) entry;
|
||||||
@ -51,7 +45,7 @@ struct conf_sec {
|
|||||||
struct opt_type {
|
struct opt_type {
|
||||||
long int num;
|
long int num;
|
||||||
float fnum;
|
float fnum;
|
||||||
bool_t bool;
|
bool boolean;
|
||||||
char *str;
|
char *str;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -40,9 +40,9 @@ string_to_opt(char *s)
|
|||||||
|
|
||||||
if (!strcmp(s, "true") || !strcmp(s, "True") ||
|
if (!strcmp(s, "true") || !strcmp(s, "True") ||
|
||||||
!strcmp(s, "TRUE") || !strcmp(s, "1"))
|
!strcmp(s, "TRUE") || !strcmp(s, "1"))
|
||||||
ret.bool = True;
|
ret.boolean = True;
|
||||||
else
|
else
|
||||||
ret.bool = False;
|
ret.boolean = False;
|
||||||
|
|
||||||
ret.str = s;
|
ret.str = s;
|
||||||
|
|
||||||
|
|||||||
10
src/split.c
10
src/split.c
@ -67,7 +67,7 @@ _split_arrange_size(Geo g, Geo *cg, Position p)
|
|||||||
|
|
||||||
/** Check if parent client of last closed client is OK for row resize
|
/** Check if parent client of last closed client is OK for row resize
|
||||||
*/
|
*/
|
||||||
static Bool
|
static bool
|
||||||
_split_check_row(Geo g1, Geo g2, Position p)
|
_split_check_row(Geo g1, Geo g2, Position p)
|
||||||
{
|
{
|
||||||
if(LDIR(p))
|
if(LDIR(p))
|
||||||
@ -124,7 +124,7 @@ split_apply_current(int screen, int tag)
|
|||||||
*\param p Position
|
*\param p Position
|
||||||
*\return True if available
|
*\return True if available
|
||||||
*/
|
*/
|
||||||
static Bool
|
static bool
|
||||||
_split_check_row_dir(Client *c, Client *g, Position p)
|
_split_check_row_dir(Client *c, Client *g, Position p)
|
||||||
{
|
{
|
||||||
int s, cs;
|
int s, cs;
|
||||||
@ -156,7 +156,7 @@ void
|
|||||||
split_arrange_closed(Client *ghost)
|
split_arrange_closed(Client *ghost)
|
||||||
{
|
{
|
||||||
Position p;
|
Position p;
|
||||||
Bool b = False;
|
bool b = False;
|
||||||
Geo cgeo;
|
Geo cgeo;
|
||||||
Client *c, *cc;
|
Client *c, *cc;
|
||||||
int screen = ghost->screen;
|
int screen = ghost->screen;
|
||||||
@ -224,7 +224,7 @@ split_arrange_closed(Client *ghost)
|
|||||||
*\return sgeo Geo of future integrated client
|
*\return sgeo Geo of future integrated client
|
||||||
*/
|
*/
|
||||||
Geo
|
Geo
|
||||||
split_client(Client *c, Bool p)
|
split_client(Client *c, bool p)
|
||||||
{
|
{
|
||||||
Geo geo, sgeo;
|
Geo geo, sgeo;
|
||||||
|
|
||||||
@ -291,7 +291,7 @@ split_client_fill(Client *c, Geo geo)
|
|||||||
void
|
void
|
||||||
split_client_integrate(Client *c, Client *sc, int screen, int tag)
|
split_client_integrate(Client *c, Client *sc, int screen, int tag)
|
||||||
{
|
{
|
||||||
Bool b = True;
|
bool b = True;
|
||||||
Geo g;
|
Geo g;
|
||||||
|
|
||||||
if(!c || c->flags & FreeFlag || !(tags[screen][tag].flags & SplitFlag))
|
if(!c || c->flags & FreeFlag || !(tags[screen][tag].flags & SplitFlag))
|
||||||
|
|||||||
@ -278,7 +278,7 @@ typedef struct
|
|||||||
Geo geo;
|
Geo geo;
|
||||||
int position;
|
int position;
|
||||||
char *statustext;
|
char *statustext;
|
||||||
Bool need_update;
|
bool need_update;
|
||||||
} InfoBar;
|
} InfoBar;
|
||||||
|
|
||||||
/* Layout Structure */
|
/* Layout Structure */
|
||||||
@ -324,7 +324,7 @@ typedef struct
|
|||||||
char *name;
|
char *name;
|
||||||
void (*func)(uicb_t);
|
void (*func)(uicb_t);
|
||||||
uicb_t cmd;
|
uicb_t cmd;
|
||||||
Bool (*check)(uicb_t);
|
bool (*check)(uicb_t);
|
||||||
char *submenu;
|
char *submenu;
|
||||||
} MenuItem;
|
} MenuItem;
|
||||||
|
|
||||||
@ -337,7 +337,7 @@ typedef struct
|
|||||||
*/
|
*/
|
||||||
char *name;
|
char *name;
|
||||||
/* Placement */
|
/* Placement */
|
||||||
Bool place_at_mouse;
|
bool place_at_mouse;
|
||||||
int align;
|
int align;
|
||||||
int x, y;
|
int x, y;
|
||||||
/* Color */
|
/* Color */
|
||||||
@ -388,10 +388,10 @@ typedef struct
|
|||||||
char *role;
|
char *role;
|
||||||
int screen;
|
int screen;
|
||||||
int tag;
|
int tag;
|
||||||
Bool free;
|
bool free;
|
||||||
Bool max;
|
bool max;
|
||||||
Bool ignoretags;
|
bool ignoretags;
|
||||||
Bool follow_client;
|
bool follow_client;
|
||||||
} Rule;
|
} Rule;
|
||||||
|
|
||||||
/* Configuration structure */
|
/* Configuration structure */
|
||||||
@ -403,13 +403,13 @@ typedef struct
|
|||||||
/* Misc option */
|
/* Misc option */
|
||||||
char *font;
|
char *font;
|
||||||
uint opacity;
|
uint opacity;
|
||||||
Bool raisefocus;
|
bool raisefocus;
|
||||||
Bool focus_fmouse;
|
bool focus_fmouse;
|
||||||
Bool focus_fmov;
|
bool focus_fmov;
|
||||||
Bool focus_pclick;
|
bool focus_pclick;
|
||||||
Bool ignore_next_client_rules;
|
bool ignore_next_client_rules;
|
||||||
Bool tagautohide;
|
bool tagautohide;
|
||||||
Bool tagnamecount;
|
bool tagnamecount;
|
||||||
Tag default_tag;
|
Tag default_tag;
|
||||||
uint pad;
|
uint pad;
|
||||||
int status_timing;
|
int status_timing;
|
||||||
@ -444,7 +444,7 @@ typedef struct
|
|||||||
int height;
|
int height;
|
||||||
MouseBinding *mouse;
|
MouseBinding *mouse;
|
||||||
int nmouse;
|
int nmouse;
|
||||||
Bool selbar;
|
bool selbar;
|
||||||
} bars;
|
} bars;
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
@ -462,10 +462,10 @@ typedef struct
|
|||||||
} root;
|
} root;
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
Bool set_new_win_master;
|
bool set_new_win_master;
|
||||||
Bool place_at_mouse;
|
bool place_at_mouse;
|
||||||
Bool border_shadow;
|
bool border_shadow;
|
||||||
Bool new_client_get_mouse;
|
bool new_client_get_mouse;
|
||||||
int borderheight;
|
int borderheight;
|
||||||
char *autofree, *automax;
|
char *autofree, *automax;
|
||||||
uint bordernormal;
|
uint bordernormal;
|
||||||
@ -486,7 +486,7 @@ typedef struct
|
|||||||
char *fg_focus;
|
char *fg_focus;
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
Bool active;
|
bool active;
|
||||||
struct { uint normal, focus; } colors;
|
struct { uint normal, focus; } colors;
|
||||||
} stipple;
|
} stipple;
|
||||||
MouseBinding *mouse;
|
MouseBinding *mouse;
|
||||||
@ -496,13 +496,13 @@ typedef struct
|
|||||||
} titlebar;
|
} titlebar;
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
Bool bar;
|
bool bar;
|
||||||
Bool tag;
|
bool tag;
|
||||||
Bool layout;
|
bool layout;
|
||||||
} border;
|
} border;
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
Bool active;
|
bool active;
|
||||||
int screen;
|
int screen;
|
||||||
int spacing;
|
int spacing;
|
||||||
} systray;
|
} systray;
|
||||||
@ -514,14 +514,14 @@ typedef struct
|
|||||||
Launcher *launcher;
|
Launcher *launcher;
|
||||||
Rule *rule;
|
Rule *rule;
|
||||||
int *ntag;
|
int *ntag;
|
||||||
Bool tag_round;
|
bool tag_round;
|
||||||
Bool tag_auto_prev;
|
bool tag_auto_prev;
|
||||||
Bool client_round;
|
bool client_round;
|
||||||
Bool client_auto_center;
|
bool client_auto_center;
|
||||||
Bool client_tile_raise;
|
bool client_tile_raise;
|
||||||
Bool layout_system; /* Switch: False, Menu: True. */
|
bool layout_system; /* Switch: False, Menu: True. */
|
||||||
Bool layout_placement; /* Right (normal): False, Left: True. */
|
bool layout_placement; /* Right (normal): False, Left: True. */
|
||||||
Bool keep_layout_geo;
|
bool keep_layout_geo;
|
||||||
char *tag_expose_name;
|
char *tag_expose_name;
|
||||||
char *expose_layout;
|
char *expose_layout;
|
||||||
char *selected_layout_symbol;
|
char *selected_layout_symbol;
|
||||||
|
|||||||
@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
#define TRAY_DWIDTH (infobar[conf.systray.screen].bar->geo.height + conf.systray.spacing)
|
#define TRAY_DWIDTH (infobar[conf.systray.screen].bar->geo.height + conf.systray.spacing)
|
||||||
|
|
||||||
Bool
|
bool
|
||||||
systray_acquire(void)
|
systray_acquire(void)
|
||||||
{
|
{
|
||||||
XSetWindowAttributes wattr;
|
XSetWindowAttributes wattr;
|
||||||
|
|||||||
@ -39,7 +39,7 @@ void
|
|||||||
tag_set(int tag)
|
tag_set(int tag)
|
||||||
{
|
{
|
||||||
Client *c;
|
Client *c;
|
||||||
Bool al = False;
|
bool al = False;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if(tag < 0 || tag > MAXTAG)
|
if(tag < 0 || tag > MAXTAG)
|
||||||
@ -226,7 +226,7 @@ uicb_tag_next_visible(uicb_t cmd)
|
|||||||
{
|
{
|
||||||
int i, tag;
|
int i, tag;
|
||||||
Client *c;
|
Client *c;
|
||||||
Bool is_occupied[MAXTAG];
|
bool is_occupied[MAXTAG];
|
||||||
(void)cmd;
|
(void)cmd;
|
||||||
|
|
||||||
screen_get_sel();
|
screen_get_sel();
|
||||||
@ -270,7 +270,7 @@ uicb_tag_prev_visible(uicb_t cmd)
|
|||||||
{
|
{
|
||||||
int i, tag;
|
int i, tag;
|
||||||
Client *c;
|
Client *c;
|
||||||
Bool is_occupied[MAXTAG];
|
bool is_occupied[MAXTAG];
|
||||||
(void)cmd;
|
(void)cmd;
|
||||||
|
|
||||||
screen_get_sel();
|
screen_get_sel();
|
||||||
|
|||||||
@ -87,7 +87,7 @@ viwmfs(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
char *cmd, str[256] = { 0 };
|
char *cmd, str[256] = { 0 };
|
||||||
Bool e;
|
bool e;
|
||||||
|
|
||||||
if(!argc)
|
if(!argc)
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
#include "wmfs.h"
|
#include "wmfs.h"
|
||||||
|
|
||||||
static volatile Bool exiting = False, sig_chld = False;
|
static volatile bool exiting = False, sig_chld = False;
|
||||||
static pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER;
|
static pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER;
|
||||||
|
|
||||||
int
|
int
|
||||||
@ -320,7 +320,7 @@ uicb_reload(uicb_t cmd)
|
|||||||
execute when wmfs will be already running).
|
execute when wmfs will be already running).
|
||||||
\return False if wmfs is not running
|
\return False if wmfs is not running
|
||||||
*/
|
*/
|
||||||
Bool
|
bool
|
||||||
check_wmfs_running(void)
|
check_wmfs_running(void)
|
||||||
{
|
{
|
||||||
Atom rt;
|
Atom rt;
|
||||||
|
|||||||
45
src/wmfs.h
45
src/wmfs.h
@ -39,6 +39,7 @@
|
|||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <stdbool.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
@ -119,9 +120,9 @@ BarWindow *barwin_create(Window parent,
|
|||||||
int x, int y,
|
int x, int y,
|
||||||
int w, int h,
|
int w, int h,
|
||||||
uint bg, char*fg,
|
uint bg, char*fg,
|
||||||
Bool entermask,
|
bool entermask,
|
||||||
Bool stipple,
|
bool stipple,
|
||||||
Bool border);
|
bool border);
|
||||||
void barwin_draw_text(BarWindow *bw, int x, int y, char *text);
|
void barwin_draw_text(BarWindow *bw, int x, int y, char *text);
|
||||||
void barwin_draw_image_ofset_text(BarWindow *bw, int x, int y, char *text, int x_image_ofset, int y_image_ofset);
|
void barwin_draw_image_ofset_text(BarWindow *bw, int x, int y, char *text, int x_image_ofset, int y_image_ofset);
|
||||||
void barwin_color_set(BarWindow *bw, uint bg, char *fg);
|
void barwin_color_set(BarWindow *bw, uint bg, char *fg);
|
||||||
@ -160,8 +161,8 @@ void uicb_toggle_tagautohide(uicb_t);
|
|||||||
/* cfactor.c */
|
/* cfactor.c */
|
||||||
void cfactor_clean(Client *c);
|
void cfactor_clean(Client *c);
|
||||||
Geo cfactor_geo(Geo geo, int fact[4], int *err);
|
Geo cfactor_geo(Geo geo, int fact[4], int *err);
|
||||||
Bool cfactor_check_2pc(Geo g1, Geo g2, Position p);
|
bool cfactor_check_2pc(Geo g1, Geo g2, Position p);
|
||||||
Bool cfactor_parentrow(Geo cg, Geo ccg, Position p);
|
bool cfactor_parentrow(Geo cg, Geo ccg, Position p);
|
||||||
void cfactor_set(Client *c, Position p, int fac);
|
void cfactor_set(Client *c, Position p, int fac);
|
||||||
void cfactor_multi_set(Client *c, int fac[4]);
|
void cfactor_multi_set(Client *c, int fac[4]);
|
||||||
/* Generated with macro {{{ */
|
/* Generated with macro {{{ */
|
||||||
@ -189,11 +190,11 @@ Client* client_gb_pos(Client *c, int x, int y);
|
|||||||
void client_get_name(Client *c);
|
void client_get_name(Client *c);
|
||||||
void client_hide(Client *c);
|
void client_hide(Client *c);
|
||||||
void client_kill(Client *c);
|
void client_kill(Client *c);
|
||||||
Bool ishide(Client *c, int screen);
|
bool ishide(Client *c, int screen);
|
||||||
void client_map(Client *c);
|
void client_map(Client *c);
|
||||||
Client* client_manage(Window w, XWindowAttributes *wa, Bool ar);
|
Client* client_manage(Window w, XWindowAttributes *wa, bool ar);
|
||||||
void client_geo_hints(Geo *geo, Client *c);
|
void client_geo_hints(Geo *geo, Client *c);
|
||||||
void client_moveresize(Client *c, Geo geo, Bool r);
|
void client_moveresize(Client *c, Geo geo, bool r);
|
||||||
void client_maximize(Client *c);
|
void client_maximize(Client *c);
|
||||||
void client_size_hints(Client *c);
|
void client_size_hints(Client *c);
|
||||||
void client_swap(Client *c1, Client *c2);
|
void client_swap(Client *c1, Client *c2);
|
||||||
@ -203,7 +204,7 @@ void client_focus_next(Client *c);
|
|||||||
void client_unmanage(Client *c);
|
void client_unmanage(Client *c);
|
||||||
void client_unmap(Client *c);
|
void client_unmap(Client *c);
|
||||||
void client_update_attributes(Client *c);
|
void client_update_attributes(Client *c);
|
||||||
void client_urgent(Client *c, Bool u);
|
void client_urgent(Client *c, bool u);
|
||||||
Client* client_get_next_with_direction(Client *bc, Position pos);
|
Client* client_get_next_with_direction(Client *bc, Position pos);
|
||||||
void uicb_client_raise(uicb_t);
|
void uicb_client_raise(uicb_t);
|
||||||
/* Generated with macro {{{ */
|
/* Generated with macro {{{ */
|
||||||
@ -228,7 +229,7 @@ void uicb_client_move(uicb_t cmd);
|
|||||||
void uicb_client_resize(uicb_t cmd);
|
void uicb_client_resize(uicb_t cmd);
|
||||||
void uicb_ignore_next_client_rules(uicb_t cmd);
|
void uicb_ignore_next_client_rules(uicb_t cmd);
|
||||||
void uicb_clientlist(uicb_t cmd);
|
void uicb_clientlist(uicb_t cmd);
|
||||||
Bool uicb_checkclist(uicb_t);
|
bool uicb_checkclist(uicb_t);
|
||||||
void uicb_client_ignore_tag(uicb_t);
|
void uicb_client_ignore_tag(uicb_t);
|
||||||
void uicb_client_set_master(uicb_t);
|
void uicb_client_set_master(uicb_t);
|
||||||
|
|
||||||
@ -248,7 +249,7 @@ void ewmh_manage_window_type(Client *c);
|
|||||||
void frame_create(Client *c);
|
void frame_create(Client *c);
|
||||||
void frame_delete(Client *c);
|
void frame_delete(Client *c);
|
||||||
void frame_moveresize(Client *c, Geo geo);
|
void frame_moveresize(Client *c, Geo geo);
|
||||||
void frame_update_color(Client *c, Bool focused);
|
void frame_update_color(Client *c, bool focused);
|
||||||
void frame_update(Client *c);
|
void frame_update(Client *c);
|
||||||
|
|
||||||
/* config.c */
|
/* config.c */
|
||||||
@ -277,7 +278,7 @@ void uicb_launcher(uicb_t);
|
|||||||
|
|
||||||
/* mouse.c */
|
/* mouse.c */
|
||||||
void mouse_resize(Client *c);
|
void mouse_resize(Client *c);
|
||||||
void mouse_grabbuttons(Client *c, Bool focused);
|
void mouse_grabbuttons(Client *c, bool focused);
|
||||||
void uicb_mouse_move(uicb_t);
|
void uicb_mouse_move(uicb_t);
|
||||||
void uicb_mouse_resize(uicb_t);
|
void uicb_mouse_resize(uicb_t);
|
||||||
|
|
||||||
@ -352,7 +353,7 @@ void uicb_screen_prev_sel(uicb_t);
|
|||||||
void statustext_handle(int sc, char *str);
|
void statustext_handle(int sc, char *str);
|
||||||
|
|
||||||
/* systray.c */
|
/* systray.c */
|
||||||
Bool systray_acquire(void);
|
bool systray_acquire(void);
|
||||||
void systray_add(Window win);
|
void systray_add(Window win);
|
||||||
void systray_del(Systray *s);
|
void systray_del(Systray *s);
|
||||||
void systray_state(Systray *s);
|
void systray_state(Systray *s);
|
||||||
@ -362,11 +363,11 @@ int systray_get_width(void);
|
|||||||
void systray_update(void);
|
void systray_update(void);
|
||||||
|
|
||||||
/* layout.c */
|
/* layout.c */
|
||||||
void arrange(int screen, Bool update_layout);
|
void arrange(int screen, bool update_layout);
|
||||||
void layout_func(int screen, int tag);
|
void layout_func(int screen, int tag);
|
||||||
Client *tiled_client(int screen, Client *c);
|
Client *tiled_client(int screen, Client *c);
|
||||||
void freelayout(int screen);
|
void freelayout(int screen);
|
||||||
void layoutswitch(Bool b);
|
void layoutswitch(bool b);
|
||||||
void maxlayout(int screen);
|
void maxlayout(int screen);
|
||||||
/* tile {{{ */
|
/* tile {{{ */
|
||||||
void tile(int screen);
|
void tile(int screen);
|
||||||
@ -388,14 +389,14 @@ void uicb_set_layout(uicb_t);
|
|||||||
void uicb_toggle_resizehint(uicb_t);
|
void uicb_toggle_resizehint(uicb_t);
|
||||||
void uicb_toggle_abovefc(uicb_t cmd);
|
void uicb_toggle_abovefc(uicb_t cmd);
|
||||||
void layout_set_client_master(Client *c);
|
void layout_set_client_master(Client *c);
|
||||||
void layout_split_client(Client *c, Bool p);
|
void layout_split_client(Client *c, bool p);
|
||||||
void layout_split_apply(Client *c);
|
void layout_split_apply(Client *c);
|
||||||
void layout_split_arrange_closed(int screen);
|
void layout_split_arrange_closed(int screen);
|
||||||
void uicb_split_client_vertical(uicb_t);
|
void uicb_split_client_vertical(uicb_t);
|
||||||
void uicb_split_client_horizontal(uicb_t);
|
void uicb_split_client_horizontal(uicb_t);
|
||||||
Bool uicb_checkmax(uicb_t);
|
bool uicb_checkmax(uicb_t);
|
||||||
Bool uicb_checkfree(uicb_t);
|
bool uicb_checkfree(uicb_t);
|
||||||
Bool uicb_checklayout(uicb_t);
|
bool uicb_checklayout(uicb_t);
|
||||||
|
|
||||||
/* init.c */
|
/* init.c */
|
||||||
void init(void);
|
void init(void);
|
||||||
@ -405,7 +406,7 @@ void split_store_geo(int screen, int tag);
|
|||||||
void split_set_current(Client *nc, Client *ghost);
|
void split_set_current(Client *nc, Client *ghost);
|
||||||
void split_apply_current(int screen, int tag);
|
void split_apply_current(int screen, int tag);
|
||||||
void split_arrange_closed(Client *ghost);
|
void split_arrange_closed(Client *ghost);
|
||||||
Geo split_client(Client *c, Bool p);
|
Geo split_client(Client *c, bool p);
|
||||||
void split_client_fill(Client *c, Geo geo);
|
void split_client_fill(Client *c, Geo geo);
|
||||||
void split_client_integrate(Client *c, Client *sc, int screen, int tag);
|
void split_client_integrate(Client *c, Client *sc, int screen, int tag);
|
||||||
void split_move_dir(Client *c, Position p);
|
void split_move_dir(Client *c, Position p);
|
||||||
@ -426,7 +427,7 @@ int errorhandler(Display *d, XErrorEvent *event);
|
|||||||
int errorhandlerdummy(Display *d, XErrorEvent *event);
|
int errorhandlerdummy(Display *d, XErrorEvent *event);
|
||||||
void quit(void);
|
void quit(void);
|
||||||
void *thread_process(void *arg);
|
void *thread_process(void *arg);
|
||||||
Bool check_wmfs_running(void);
|
bool check_wmfs_running(void);
|
||||||
void exec_uicb_function(char *func, char *cmd);
|
void exec_uicb_function(char *func, char *cmd);
|
||||||
void handle_signal(int signum);
|
void handle_signal(int signum);
|
||||||
void uicb_quit(uicb_t);
|
void uicb_quit(uicb_t);
|
||||||
@ -441,7 +442,7 @@ int selscreen;
|
|||||||
int prevselscreen;
|
int prevselscreen;
|
||||||
Conf conf;
|
Conf conf;
|
||||||
Key *keys;
|
Key *keys;
|
||||||
Bool estatus;
|
bool estatus;
|
||||||
Geo *sgeo;
|
Geo *sgeo;
|
||||||
Geo *spgeo;
|
Geo *spgeo;
|
||||||
Cursor cursor[CurLast];
|
Cursor cursor[CurLast];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user