an empty slit without autoHide but with clients in the slitlist file still created a strut
markt markt
3 files changed,
10 insertions(+),
8 deletions(-)
M
src/Slit.cc
→
src/Slit.cc
@@ -259,7 +259,7 @@ unsigned int Slit::s_eventmask = SubstructureRedirectMask | ButtonPressMask |
EnterWindowMask | LeaveWindowMask | ExposureMask; Slit::Slit(BScreen &scr, FbTk::XLayer &layer, const char *filename) - : m_hidden(false), + : m_hidden(false), m_visible(false), m_screen(scr), m_clientlist_menu(scr.menuTheme(), scr.imageControl(),@@ -369,8 +369,7 @@ bool had_strut = m_strut ? true : false;
clearStrut(); // no need for area if we're autohiding or set maximize over // or if we dont have any clients - if (doAutoHide() || *m_rc_maximize_over || - clients().empty()) { + if (doAutoHide() || *m_rc_maximize_over || !m_visible) { // update screen area if we had a strut before if (had_strut) screen().updateAvailableWorkspaceArea();@@ -720,9 +719,9 @@ reposition();
// did we actually use slit slots if (num_windows == 0) - frame.window.hide(); + hide(); else - frame.window.show(); + show(); int x = 0, y = 0; height_inc = false;
M
src/Slit.hh
→
src/Slit.hh
@@ -68,8 +68,8 @@
Slit(BScreen &screen, FbTk::XLayer &layer, const char *filename = 0); virtual ~Slit(); - void show() { frame.window.show(); } - void hide() { frame.window.hide(); } + void show() { frame.window.show(); m_visible = true; } + void hide() { frame.window.hide(); m_visible = false; } void setDirection(Direction dir); void setPlacement(Placement place); void addClient(Window clientwin);@@ -139,7 +139,8 @@ void updateClientmenu();
void clearStrut(); void updateStrut(); - bool m_hidden; + // m_hidden is for autohide, m_visible is the FbWindow state + bool m_hidden, m_visible; BScreen &m_screen; FbTk::Timer m_timer;