diff --git a/config.c b/config.c index ee4a273d..92106e41 100644 --- a/config.c +++ b/config.c @@ -514,22 +514,22 @@ config_parse(const char *confpatharg) }; static cfg_opt_t widget_opts[] = { - CFG_INT((char *) "x", -1, CFGF_NONE), - CFG_INT((char *) "y", -1, CFGF_NONE), + CFG_INT((char *) "x", 0xffffffff, CFGF_NONE), + CFG_INT((char *) "y", 0xffffffff, CFGF_NONE), CFG_SEC((char *) "mouse", mouse_generic_opts, CFGF_MULTI), CFG_END() }; static cfg_opt_t widget_taglist_opts[] = { - CFG_INT((char *) "x", -1, CFGF_NONE), - CFG_INT((char *) "y", -1, CFGF_NONE), + CFG_INT((char *) "x", 0xffffffff, CFGF_NONE), + CFG_INT((char *) "y", 0xffffffff, CFGF_NONE), CFG_SEC((char *) "mouse", mouse_taglist_opts, CFGF_MULTI), CFG_END() }; static cfg_opt_t widget_iconbox_opts[] = { - CFG_INT((char *) "x", -1, CFGF_NONE), - CFG_INT((char *) "y", -1, CFGF_NONE), + CFG_INT((char *) "x", 0xffffffff, CFGF_NONE), + CFG_INT((char *) "y", 0xffffffff, CFGF_NONE), CFG_SEC((char *) "mouse", mouse_generic_opts, CFGF_MULTI), CFG_STR((char *) "image", (char *) NULL, CFGF_NONE), CFG_BOOL((char *) "resize", cfg_true, CFGF_NONE), @@ -537,8 +537,8 @@ config_parse(const char *confpatharg) }; static cfg_opt_t widget_textbox_opts[] = { - CFG_INT((char *) "x", -1, CFGF_NONE), - CFG_INT((char *) "y", -1, CFGF_NONE), + CFG_INT((char *) "x", 0xffffffff, CFGF_NONE), + CFG_INT((char *) "y", 0xffffffff, CFGF_NONE), CFG_SEC((char *) "mouse", mouse_generic_opts, CFGF_MULTI), CFG_INT((char *) "width", 0, CFGF_NONE), CFG_STR((char *) "text", (char *) NULL, CFGF_NONE), @@ -550,8 +550,8 @@ config_parse(const char *confpatharg) }; static cfg_opt_t widget_focustitle_opts[] = { - CFG_INT((char *) "x", -1, CFGF_NONE), - CFG_INT((char *) "y", -1, CFGF_NONE), + CFG_INT((char *) "x", 0xffffffff, CFGF_NONE), + CFG_INT((char *) "y", 0xffffffff, CFGF_NONE), CFG_SEC((char *) "mouse", mouse_generic_opts, CFGF_MULTI), CFG_STR((char *) "fg", (char *) NULL, CFGF_NONE), CFG_STR((char *) "bg", (char *) NULL, CFGF_NONE), @@ -561,8 +561,8 @@ config_parse(const char *confpatharg) }; static cfg_opt_t widget_tasklist_opts[] = { - CFG_INT((char *) "x", -1, CFGF_NONE), - CFG_INT((char *) "y", -1, CFGF_NONE), + CFG_INT((char *) "x", 0xffffffff, CFGF_NONE), + CFG_INT((char *) "y", 0xffffffff, CFGF_NONE), CFG_SEC((char *) "mouse", mouse_generic_opts, CFGF_MULTI), CFG_STR((char *) "fg", (char *) NULL, CFGF_NONE), CFG_STR((char *) "bg", (char *) NULL, CFGF_NONE), @@ -581,8 +581,8 @@ config_parse(const char *confpatharg) }; static cfg_opt_t widget_progressbar_opts[] = { - CFG_INT((char *) "x", -1, CFGF_NONE), - CFG_INT((char *) "y", -1, CFGF_NONE), + CFG_INT((char *) "x", 0xffffffff, CFGF_NONE), + CFG_INT((char *) "y", 0xffffffff, CFGF_NONE), CFG_SEC((char *) "mouse", mouse_generic_opts, CFGF_MULTI), CFG_SEC((char *) "bar", widget_progressbar_bar_opts, CFGF_MULTI), CFG_INT((char *) "width", 100, CFGF_NONE), diff --git a/widget.c b/widget.c index 121c882f..f5697533 100644 --- a/widget.c +++ b/widget.c @@ -117,8 +117,8 @@ widget_common_new(Widget *widget, Statusbar *statusbar, cfg_t* config) widget->button_press = widget_common_button_press; widget->area.x = cfg_getint(config, "x"); widget->area.y = cfg_getint(config, "y"); - widget->user_supplied_x = (widget->area.x >= 0); - widget->user_supplied_y = (widget->area.y >= 0); + widget->user_supplied_x = (widget->area.x != (int) 0xffffffff); + widget->user_supplied_y = (widget->area.y != (int) 0xffffffff); } /** Send command to widget