aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Slit.cc17
-rw-r--r--src/Slit.hh1
2 files changed, 15 insertions, 3 deletions
diff --git a/src/Slit.cc b/src/Slit.cc
index 1851a16..57de638 100644
--- a/src/Slit.cc
+++ b/src/Slit.cc
@@ -207,7 +207,7 @@ unsigned int Slit::s_eventmask = SubstructureRedirectMask | ButtonPressMask |
207 EnterWindowMask | LeaveWindowMask | ExposureMask; 207 EnterWindowMask | LeaveWindowMask | ExposureMask;
208 208
209Slit::Slit(BScreen &scr, FbTk::Layer &layer, const char *filename) 209Slit::Slit(BScreen &scr, FbTk::Layer &layer, const char *filename)
210 : m_hidden(false), m_visible(false), 210 : m_hidden(false), m_visible(false), m_pending_reconfigure(false),
211 m_screen(scr), 211 m_screen(scr),
212 m_clientlist_menu(scr.menuTheme(), 212 m_clientlist_menu(scr.menuTheme(),
213 scr.imageControl(), 213 scr.imageControl(),
@@ -565,6 +565,12 @@ void Slit::removeClient(Window w, bool remap) {
565 565
566void Slit::reconfigure() { 566void Slit::reconfigure() {
567 567
568 bool allow_autohide = true;
569 if (m_hidden)
570 m_pending_reconfigure = true;
571 else if (m_pending_reconfigure)
572 allow_autohide = false; // this is for a pending one, triggerd by unhide
573
568 frame.width = 0; 574 frame.width = 0;
569 frame.height = 0; 575 frame.height = 0;
570 576
@@ -720,7 +726,7 @@ void Slit::reconfigure() {
720 x += (*client_it)->width() + bevel_width; 726 x += (*client_it)->width() + bevel_width;
721 } // end for 727 } // end for
722 728
723 if (doAutoHide() && !isHidden() && !m_timer.isTiming()) 729 if (allow_autohide && doAutoHide() && !isHidden() && !m_timer.isTiming())
724 m_timer.start(); 730 m_timer.start();
725 else if (!doAutoHide() && isHidden()) 731 else if (!doAutoHide() && isHidden())
726 toggleHidden(); // restore visible 732 toggleHidden(); // restore visible
@@ -1049,8 +1055,13 @@ void Slit::toggleHidden() {
1049 m_hidden = ! m_hidden; // toggle hidden state 1055 m_hidden = ! m_hidden; // toggle hidden state
1050 if (isHidden()) 1056 if (isHidden())
1051 frame.window.move(frame.x_hidden, frame.y_hidden); 1057 frame.window.move(frame.x_hidden, frame.y_hidden);
1052 else 1058 else {
1053 frame.window.move(frame.x, frame.y); 1059 frame.window.move(frame.x, frame.y);
1060 if (m_pending_reconfigure) {
1061 reconfigure();
1062 m_pending_reconfigure = false;
1063 }
1064 }
1054} 1065}
1055 1066
1056void Slit::loadClientList(const char *filename) { 1067void Slit::loadClientList(const char *filename) {
diff --git a/src/Slit.hh b/src/Slit.hh
index 92eac35..7d643d6 100644
--- a/src/Slit.hh
+++ b/src/Slit.hh
@@ -144,6 +144,7 @@ private:
144 144
145 // m_hidden is for autohide, m_visible is the FbWindow state 145 // m_hidden is for autohide, m_visible is the FbWindow state
146 bool m_hidden, m_visible; 146 bool m_hidden, m_visible;
147 bool m_pending_reconfigure;
147 148
148 BScreen &m_screen; 149 BScreen &m_screen;
149 FbTk::Timer m_timer; 150 FbTk::Timer m_timer;