From 9212e1d7c81934720d764c03f2d27e41d31edb56 Mon Sep 17 00:00:00 2001 From: markt Date: Sat, 17 Feb 2007 17:40:50 +0000 Subject: an empty slit without autoHide but with clients in the slitlist file still created a strut --- ChangeLog | 2 ++ src/Slit.cc | 9 ++++----- src/Slit.hh | 7 ++++--- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1f43df7..45a7b5a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ (Format: Year/Month/Day) Changes for 1.0rc3: *07/02/17: + * Slit was creating a strut even when it wasn't visible (Mark) + Slit.cc/hh * Update workspace names on reconfigure, and don't overwrite workspace names not being used (Mark) fluxbox.cc Screen.cc diff --git a/src/Slit.cc b/src/Slit.cc index fb12ca6..564523a 100644 --- a/src/Slit.cc +++ b/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 @@ void Slit::updateStrut() { 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 @@ void Slit::reconfigure() { // 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; diff --git a/src/Slit.hh b/src/Slit.hh index ef1c58e..06a8a25 100644 --- a/src/Slit.hh +++ b/src/Slit.hh @@ -68,8 +68,8 @@ public: 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 @@ private: 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; -- cgit v0.11.2