all repos — fluxbox @ c2cc8cb8b8d23bcf85d0367cf5ba01ffcb9a1cee

custom fork of the fluxbox windowmanager

autohide tweak
rathnor rathnor
commit

c2cc8cb8b8d23bcf85d0367cf5ba01ffcb9a1cee

parent

830ffc0c6f5263b2decdac4ba74aa75fd47c78e4

1 files changed, 19 insertions(+), 10 deletions(-)

jump to
M src/Slit.ccsrc/Slit.cc

@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Slit.cc,v 1.43 2003/05/01 15:03:36 rathnor Exp $ +// $Id: Slit.cc,v 1.44 2003/05/01 15:35:24 rathnor Exp $ #include "Slit.hh"

@@ -1007,14 +1007,13 @@

if (hidden) { if (timer.isTiming()) timer.stop(); - } else if (! slitmenu.isVisible()) { - if (! timer.isTiming()) - timer.start(); } else { - // the menu is open, keep it firing until it closes - timer.fireOnce(false); - if (! timer.isTiming()) + if (! timer.isTiming()) { + // the menu is open, keep it firing until it closes + if (slitmenu.isVisible()) + timer.fireOnce(false); timer.start(); + } } }

@@ -1057,10 +1056,14 @@ }

void Slit::timeout() { - if (!slitmenu.isVisible()) { - timer.fireOnce(true); + if (do_auto_hide) { + if (!slitmenu.isVisible()) { + timer.fireOnce(true); + } else + return; } else - return; + if (!hidden) return; + hidden = ! hidden; // toggle hidden state if (hidden) frame.window.move(frame.x_hidden, frame.y_hidden);

@@ -1129,6 +1132,12 @@

void Slit::setAutoHide(bool val) { do_auto_hide = val; screen().saveSlitAutoHide(val); + if (do_auto_hide) + if (! timer.isTiming()) { + if (slitmenu.isVisible()) + timer.fireOnce(false); + timer.start(); + } } void Slit::setupMenu() {