[I1442] Support merging down default block.

Issue: #1442
This commit is contained in:
Dave Davenport 2021-09-08 13:30:43 +02:00
parent fe87ccdfb1
commit e5363ab22e
3 changed files with 12 additions and 2 deletions

View File

@ -376,7 +376,8 @@ t_entry_list:
g_list_free ( $3 );
}
| t_entry_list T_PDEFAULTS T_BOPEN t_property_list_optional T_BCLOSE {
rofi_theme_widget_add_properties ( $1, $4);
ThemeWidget *widget = rofi_theme_find_or_create_name ( $1, "*" );
rofi_theme_widget_add_properties (widget, $4);
if ( $4 ) {
g_hash_table_destroy ( $4 );
}

View File

@ -1009,6 +1009,12 @@ int main(int argc, char *argv[]) {
cleanup();
return EXIT_SUCCESS;
}
if (find_arg("-dump-processed-theme") >= 0) {
rofi_theme_parse_process_conditionals();
rofi_theme_print(rofi_theme);
cleanup();
return EXIT_SUCCESS;
}
if (find_arg("-dump-config") >= 0) {
config_parse_dump_config_rasi_format(stdout, FALSE);
cleanup();

View File

@ -1379,8 +1379,11 @@ static void rofi_theme_parse_process_conditionals_int(workarea mon,
while (i < rwidget->num_widgets) {
ThemeWidget *widget = rwidget->widgets[i];
if (widget->media != NULL) {
rwidget->widgets[i] = rwidget->widgets[rwidget->num_widgets - 1];
rwidget->num_widgets--;
for (unsigned x = i; x < rwidget->num_widgets; x++) {
rwidget->widgets[x] = rwidget->widgets[x + 1];
}
rwidget->widgets[rwidget->num_widgets] = NULL;
switch (widget->media->type) {
case THEME_MEDIA_TYPE_MIN_WIDTH: {
int w = widget->media->value;