mirror of
https://github.com/davatorium/rofi.git
synced 2025-02-17 15:45:56 -05:00
[Window] Try to fix the autosizing of desktop name for non-i3 dekstop.
Issue: #1439
This commit is contained in:
parent
4d0eaf1463
commit
c63e03fd49
1 changed files with 12 additions and 8 deletions
|
@ -633,27 +633,31 @@ static void _window_mode_load_data(Mode *sw, unsigned int cd) {
|
||||||
g_free(output);
|
g_free(output);
|
||||||
} else {
|
} else {
|
||||||
winclient->wmdesktopstr = g_strdup("Invalid name");
|
winclient->wmdesktopstr = g_strdup("Invalid name");
|
||||||
pd->wmdn_len = MAX(pd->wmdn_len,
|
winclient->wmdesktopstr_len =
|
||||||
g_utf8_strlen(winclient->wmdesktopstr, -1));
|
g_utf8_strlen(winclient->wmdesktopstr, -1);
|
||||||
|
pd->wmdn_len = MAX(pd->wmdn_len, winclient->wmdesktopstr_len);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
winclient->wmdesktopstr = g_markup_escape_text(
|
winclient->wmdesktopstr = g_markup_escape_text(
|
||||||
_window_name_list_entry(names.strings, names.strings_len,
|
_window_name_list_entry(names.strings, names.strings_len,
|
||||||
winclient->wmdesktop),
|
winclient->wmdesktop),
|
||||||
-1);
|
-1);
|
||||||
pd->wmdn_len =
|
winclient->wmdesktopstr_len =
|
||||||
MAX(pd->wmdn_len, g_utf8_strlen(winclient->wmdesktopstr, -1));
|
g_utf8_strlen(winclient->wmdesktopstr, -1);
|
||||||
|
pd->wmdn_len = MAX(pd->wmdn_len, winclient->wmdesktopstr_len);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
winclient->wmdesktopstr =
|
winclient->wmdesktopstr =
|
||||||
g_strdup_printf("%u", (uint32_t)winclient->wmdesktop);
|
g_strdup_printf("%u", (uint32_t)winclient->wmdesktop);
|
||||||
pd->wmdn_len =
|
winclient->wmdesktopstr_len =
|
||||||
MAX(pd->wmdn_len, g_utf8_strlen(winclient->wmdesktopstr, -1));
|
g_utf8_strlen(winclient->wmdesktopstr, -1);
|
||||||
|
pd->wmdn_len = MAX(pd->wmdn_len, winclient->wmdesktopstr_len);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
winclient->wmdesktopstr = g_strdup("");
|
winclient->wmdesktopstr = g_strdup("");
|
||||||
pd->wmdn_len =
|
winclient->wmdesktopstr_len =
|
||||||
MAX(pd->wmdn_len, g_utf8_strlen(winclient->wmdesktopstr, -1));
|
g_utf8_strlen(winclient->wmdesktopstr, -1);
|
||||||
|
pd->wmdn_len = MAX(pd->wmdn_len, winclient->wmdesktopstr_len);
|
||||||
}
|
}
|
||||||
if (cd && winclient->wmdesktop != current_desktop) {
|
if (cd && winclient->wmdesktop != current_desktop) {
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Add table
Reference in a new issue