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
This commit is contained in:
parent
dc226902a7
commit
50b6102bbf
2 changed files with 15 additions and 3 deletions
17
src/Slit.cc
17
src/Slit.cc
|
@ -207,7 +207,7 @@ unsigned int Slit::s_eventmask = SubstructureRedirectMask | ButtonPressMask |
|
|||
EnterWindowMask | LeaveWindowMask | ExposureMask;
|
||||
|
||||
Slit::Slit(BScreen &scr, FbTk::Layer &layer, const char *filename)
|
||||
: m_hidden(false), m_visible(false),
|
||||
: m_hidden(false), m_visible(false), m_pending_reconfigure(false),
|
||||
m_screen(scr),
|
||||
m_clientlist_menu(scr.menuTheme(),
|
||||
scr.imageControl(),
|
||||
|
@ -565,6 +565,12 @@ void Slit::removeClient(Window w, bool remap) {
|
|||
|
||||
void Slit::reconfigure() {
|
||||
|
||||
bool allow_autohide = true;
|
||||
if (m_hidden)
|
||||
m_pending_reconfigure = true;
|
||||
else if (m_pending_reconfigure)
|
||||
allow_autohide = false; // this is for a pending one, triggerd by unhide
|
||||
|
||||
frame.width = 0;
|
||||
frame.height = 0;
|
||||
|
||||
|
@ -720,7 +726,7 @@ void Slit::reconfigure() {
|
|||
x += (*client_it)->width() + bevel_width;
|
||||
} // end for
|
||||
|
||||
if (doAutoHide() && !isHidden() && !m_timer.isTiming())
|
||||
if (allow_autohide && doAutoHide() && !isHidden() && !m_timer.isTiming())
|
||||
m_timer.start();
|
||||
else if (!doAutoHide() && isHidden())
|
||||
toggleHidden(); // restore visible
|
||||
|
@ -1049,8 +1055,13 @@ void Slit::toggleHidden() {
|
|||
m_hidden = ! m_hidden; // toggle hidden state
|
||||
if (isHidden())
|
||||
frame.window.move(frame.x_hidden, frame.y_hidden);
|
||||
else
|
||||
else {
|
||||
frame.window.move(frame.x, frame.y);
|
||||
if (m_pending_reconfigure) {
|
||||
reconfigure();
|
||||
m_pending_reconfigure = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Slit::loadClientList(const char *filename) {
|
||||
|
|
|
@ -144,6 +144,7 @@ private:
|
|||
|
||||
// m_hidden is for autohide, m_visible is the FbWindow state
|
||||
bool m_hidden, m_visible;
|
||||
bool m_pending_reconfigure;
|
||||
|
||||
BScreen &m_screen;
|
||||
FbTk::Timer m_timer;
|
||||
|
|
Loading…
Reference in a new issue