aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas Lübking <thomas.luebking@gmail.com>2016-07-24 14:51:50 (GMT)
committerMathias Gumz <akira@fluxbox.org>2016-07-30 16:38:28 (GMT)
commit50b6102bbf998fc1d8393d4d48bf9507c359a9b9 (patch)
tree430f9b156d001f0c606a3538e0e7bb96f3fd0a77 /src
parentdc226902a7c94ee2c2f7304c389324c88ff5a60c (diff)
downloadfluxbox-50b6102bbf998fc1d8393d4d48bf9507c359a9b9.zip
fluxbox-50b6102bbf998fc1d8393d4d48bf9507c359a9b9.tar.bz2
flag slit for reconfiguration and act on show
According to Peter Ganzhorn, there's a transparency issue when using an autohiding slit, but I don't use a slit at all. However, the explanations in the bug do make sense and this is just an alternative approach on the problem (that does not require interim showing) BUG: 1132
Diffstat (limited to 'src')
-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;