all repos — fluxbox @ c0bfde4aca594edc69a59ee36a7a6bbc9fa47a5d

custom fork of the fluxbox windowmanager

fix some crashes with empty menus, and fixed default workspace names
markt markt
commit

c0bfde4aca594edc69a59ee36a7a6bbc9fa47a5d

parent

e35670d4a6a1ace394ff13cae39e41c2171b9054

3 files changed, 9 insertions(+), 7 deletions(-)

jump to
M ChangeLogChangeLog

@@ -1,6 +1,8 @@

(Format: Year/Month/Day) Changes for 1.0rc3: *07/01/26: + * Fix default workspace names, and don't show empty menus (Mark) + Workspace.cc FbTk/Menu.cc * Opening a window on a different workspace with Focus New Windows enabled should focus the window when you get to that workspace -- as a free bonus, stacking order should be more stable on fluxbox restart (Mark)
M src/FbTk/Menu.ccsrc/FbTk/Menu.cc

@@ -408,6 +408,9 @@ ii = (*it)->width(theme());

menu.item_w = (ii > menu.item_w ? ii : menu.item_w); } + if (menu.item_w < 1) + menu.item_w = 1; + if (!menuitems.empty()) { menu.sublevels = 1;

@@ -436,12 +439,8 @@ if (m_title_vis)

new_height += theme().titleHeight() + ((menu.frame_h > 0)?menu.title.borderWidth():0); - if (new_width == 0) { - if (menu.item_w > 0) - new_width = menu.item_w; - else - new_width = 1; - } + if (new_width == 0) + new_width = menu.item_w; if (new_height < 1) new_height = 1;

@@ -530,7 +529,7 @@

void Menu::show() { - if (isVisible()) + if (isVisible() || !menuitems.size()) return; m_visible = true;
M src/Workspace.ccsrc/Workspace.cc

@@ -376,6 +376,7 @@ sprintf(tname,

_FB_XTEXT(Workspace, DefaultNameFormat, "Workspace %d", "Default workspace names, with a %d for the workspace number").c_str(), m_id + 1); //m_id starts at 0 + m_name = tname; } screen().updateWorkspaceNamesAtom();