diff options
author | markt <markt> | 2007-02-17 17:40:50 (GMT) |
---|---|---|
committer | markt <markt> | 2007-02-17 17:40:50 (GMT) |
commit | 9212e1d7c81934720d764c03f2d27e41d31edb56 (patch) | |
tree | 3abb7b27719fb496320b78dd1e64b9c846887e26 | |
parent | 2f130ce836c85f40df95a35174fff0cbd0242834 (diff) | |
download | fluxbox_paul-9212e1d7c81934720d764c03f2d27e41d31edb56.zip fluxbox_paul-9212e1d7c81934720d764c03f2d27e41d31edb56.tar.bz2 |
an empty slit without autoHide but with clients in the slitlist file still created a strut
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | src/Slit.cc | 9 | ||||
-rw-r--r-- | src/Slit.hh | 7 |
3 files changed, 10 insertions, 8 deletions
@@ -1,6 +1,8 @@ | |||
1 | (Format: Year/Month/Day) | 1 | (Format: Year/Month/Day) |
2 | Changes for 1.0rc3: | 2 | Changes for 1.0rc3: |
3 | *07/02/17: | 3 | *07/02/17: |
4 | * Slit was creating a strut even when it wasn't visible (Mark) | ||
5 | Slit.cc/hh | ||
4 | * Update workspace names on reconfigure, and don't overwrite workspace names | 6 | * Update workspace names on reconfigure, and don't overwrite workspace names |
5 | not being used (Mark) | 7 | not being used (Mark) |
6 | fluxbox.cc Screen.cc | 8 | 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 | | |||
259 | EnterWindowMask | LeaveWindowMask | ExposureMask; | 259 | EnterWindowMask | LeaveWindowMask | ExposureMask; |
260 | 260 | ||
261 | Slit::Slit(BScreen &scr, FbTk::XLayer &layer, const char *filename) | 261 | Slit::Slit(BScreen &scr, FbTk::XLayer &layer, const char *filename) |
262 | : m_hidden(false), | 262 | : m_hidden(false), m_visible(false), |
263 | m_screen(scr), | 263 | m_screen(scr), |
264 | m_clientlist_menu(scr.menuTheme(), | 264 | m_clientlist_menu(scr.menuTheme(), |
265 | scr.imageControl(), | 265 | scr.imageControl(), |
@@ -369,8 +369,7 @@ void Slit::updateStrut() { | |||
369 | clearStrut(); | 369 | clearStrut(); |
370 | // no need for area if we're autohiding or set maximize over | 370 | // no need for area if we're autohiding or set maximize over |
371 | // or if we dont have any clients | 371 | // or if we dont have any clients |
372 | if (doAutoHide() || *m_rc_maximize_over || | 372 | if (doAutoHide() || *m_rc_maximize_over || !m_visible) { |
373 | clients().empty()) { | ||
374 | // update screen area if we had a strut before | 373 | // update screen area if we had a strut before |
375 | if (had_strut) | 374 | if (had_strut) |
376 | screen().updateAvailableWorkspaceArea(); | 375 | screen().updateAvailableWorkspaceArea(); |
@@ -720,9 +719,9 @@ void Slit::reconfigure() { | |||
720 | 719 | ||
721 | // did we actually use slit slots | 720 | // did we actually use slit slots |
722 | if (num_windows == 0) | 721 | if (num_windows == 0) |
723 | frame.window.hide(); | 722 | hide(); |
724 | else | 723 | else |
725 | frame.window.show(); | 724 | show(); |
726 | 725 | ||
727 | int x = 0, y = 0; | 726 | int x = 0, y = 0; |
728 | height_inc = false; | 727 | 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: | |||
68 | Slit(BScreen &screen, FbTk::XLayer &layer, const char *filename = 0); | 68 | Slit(BScreen &screen, FbTk::XLayer &layer, const char *filename = 0); |
69 | virtual ~Slit(); | 69 | virtual ~Slit(); |
70 | 70 | ||
71 | void show() { frame.window.show(); } | 71 | void show() { frame.window.show(); m_visible = true; } |
72 | void hide() { frame.window.hide(); } | 72 | void hide() { frame.window.hide(); m_visible = false; } |
73 | void setDirection(Direction dir); | 73 | void setDirection(Direction dir); |
74 | void setPlacement(Placement place); | 74 | void setPlacement(Placement place); |
75 | void addClient(Window clientwin); | 75 | void addClient(Window clientwin); |
@@ -139,7 +139,8 @@ private: | |||
139 | void clearStrut(); | 139 | void clearStrut(); |
140 | void updateStrut(); | 140 | void updateStrut(); |
141 | 141 | ||
142 | bool m_hidden; | 142 | // m_hidden is for autohide, m_visible is the FbWindow state |
143 | bool m_hidden, m_visible; | ||
143 | 144 | ||
144 | BScreen &m_screen; | 145 | BScreen &m_screen; |
145 | FbTk::Timer m_timer; | 146 | FbTk::Timer m_timer; |