X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=openbox%2Fconfig.c;h=8e1bcf899c0ea24c89e244e2f366d469a49ed007;hb=9614dd8da2cd34475d84bf9b5366f6e73481ca6c;hp=03fc96b35bafc937f8fef9e4caf7411af1f03a7a;hpb=782b2864b1cc5ffab426dfb784a973576a98de18;p=chaz%2Fopenbox diff --git a/openbox/config.c b/openbox/config.c index 03fc96b3..8e1bcf89 100644 --- a/openbox/config.c +++ b/openbox/config.c @@ -154,13 +154,10 @@ void config_app_settings_copy_non_defaults(const ObAppSettings *src, /* monitor is copied above */ } - if (src->size_given) { - dst->size_given = TRUE; - dst->width_num = src->width_num; - dst->width_denom = src->width_denom; - dst->height_num = src->height_num; - dst->height_denom = src->height_denom; - } + dst->width_num = src->width_num; + dst->width_denom = src->width_denom; + dst->height_num = src->height_num; + dst->height_denom = src->height_denom; } void config_parse_relative_number(gchar *s, gint *num, gint *denom) @@ -212,7 +209,6 @@ static void parse_single_per_app_settings(xmlNodePtr app, { xmlNodePtr n, c; gboolean x_pos_given = FALSE; - gboolean width_given = FALSE; if ((n = obt_xml_find_node(app->children, "decor"))) if (!obt_xml_node_contains(n, "default")) @@ -263,20 +259,22 @@ static void parse_single_per_app_settings(xmlNodePtr app, config_parse_relative_number(s, &settings->width_num, &settings->width_denom); - if (settings->width_num > 0 && settings->width_denom >= 0) - width_given = TRUE; + if (settings->width_num <= 0 || settings->width_denom < 0) + settings->width_num = settings->width_denom = 0; g_free(s); } } - if (width_given && (c = obt_xml_find_node(n->children, "height"))) { - gchar *s = obt_xml_node_string(c); - config_parse_relative_number(s, - &settings->height_num, - &settings->height_denom); - if (settings->height_num > 0 && settings->height_denom >= 0) - settings->size_given = TRUE; - g_free(s); + if ((c = obt_xml_find_node(n->children, "height"))) { + if (!obt_xml_node_contains(c, "default")) { + gchar *s = obt_xml_node_string(c); + config_parse_relative_number(s, + &settings->height_num, + &settings->height_denom); + if (settings->height_num <= 0 || settings->height_denom < 0) + settings->height_num = settings->height_denom = 0; + g_free(s); + } } } @@ -930,9 +928,9 @@ static void parse_menu(xmlNodePtr node, gpointer d) config_menu_manage_desktops = obt_xml_node_bool(n); if ((n = obt_xml_find_node(node, "showIcons"))) { config_menu_show_icons = obt_xml_node_bool(n); -#ifndef USE_IMLIB2 +#if !defined(USE_IMLIB2) && !defined(USE_LIBRSVG) if (config_menu_show_icons) - g_message(_("Openbox was compiled without Imlib2 image loading support. Icons in menus will not be loaded.")); + g_message(_("Openbox was compiled without image loading support. Icons in menus will not be loaded.")); #endif }