all repos — fluxbox @ fe92b6b39bc007bffacc2fb57bee511b1626939e

custom fork of the fluxbox windowmanager

revert to relative iconbar alignment when too many windows are open
Mark Tiefenbruck mark@fluxbox.org
commit

fe92b6b39bc007bffacc2fb57bee511b1626939e

parent

02e0f9321cce4f331ce2523621830e3102c04493

2 files changed, 19 insertions(+), 23 deletions(-)

jump to
M ChangeLogChangeLog

@@ -1,5 +1,8 @@

(Format: Year/Month/Day) Changes for 1.1.2 +*09/06/28: + * Revert to relative iconbar alignment when too many windows are open (Mark) + FbTk/Container.cc *09/05/26: * Fixed unexpected window focus changes under "focus follows mouse" (Jim) FocusControl.cc/hh Window.cc fluxbox.cc Screen.cc
M src/FbTk/Container.ccsrc/FbTk/Container.cc

@@ -410,31 +410,24 @@ }

unsigned int Container::maxWidthPerClient() const { - switch (alignment()) { - case RIGHT: - case CENTER: - case LEFT: - return m_max_size_per_client; - break; - case RELATIVE: - if (size() == 0) - return width(); - else { - unsigned int borderW = m_item_list.front()->borderWidth(); - // there're count-1 borders to fit in with the windows - // -> 1 per window plus end - unsigned int w = width(), h = height(); - translateSize(m_orientation, w, h); - if (w < (size()-1)*borderW) - return 1; - else - return (w - (size() - 1) * borderW) / size(); - } - break; + unsigned int max_relative_size; + if (size() == 0) + max_relative_size = width(); + else { + unsigned int borderW = m_item_list.front()->borderWidth(); + // there're count-1 borders to fit in with the windows + // -> 1 per window plus end + unsigned int w = width(), h = height(); + translateSize(m_orientation, w, h); + max_relative_size = w < (size()-1)*borderW ? 1 : + (w - (size() - 1) * borderW) / size(); } - // this will never happen anyway - return 1; + if (alignment() == RELATIVE) + return max_relative_size; + + return (m_max_size_per_client < max_relative_size ? + m_max_size_per_client : max_relative_size); } void Container::for_each(std::mem_fun_t<void, FbWindow> function) {