aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrathnor <rathnor>2003-05-01 15:35:24 (GMT)
committerrathnor <rathnor>2003-05-01 15:35:24 (GMT)
commitc2cc8cb8b8d23bcf85d0367cf5ba01ffcb9a1cee (patch)
tree47e1d8a87bbeaaffdab4f39cc57ba18c0800d1b4 /src
parent830ffc0c6f5263b2decdac4ba74aa75fd47c78e4 (diff)
downloadfluxbox_pavel-c2cc8cb8b8d23bcf85d0367cf5ba01ffcb9a1cee.zip
fluxbox_pavel-c2cc8cb8b8d23bcf85d0367cf5ba01ffcb9a1cee.tar.bz2
autohide tweak
Diffstat (limited to 'src')
-rw-r--r--src/Slit.cc29
1 files changed, 19 insertions, 10 deletions
diff --git a/src/Slit.cc b/src/Slit.cc
index df05b4f..f55fc5b 100644
--- a/src/Slit.cc
+++ b/src/Slit.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Slit.cc,v 1.43 2003/05/01 15:03:36 rathnor Exp $ 25// $Id: Slit.cc,v 1.44 2003/05/01 15:35:24 rathnor Exp $
26 26
27#include "Slit.hh" 27#include "Slit.hh"
28 28
@@ -1007,14 +1007,13 @@ void Slit::leaveNotifyEvent(XCrossingEvent &ev) {
1007 if (hidden) { 1007 if (hidden) {
1008 if (timer.isTiming()) 1008 if (timer.isTiming())
1009 timer.stop(); 1009 timer.stop();
1010 } else if (! slitmenu.isVisible()) {
1011 if (! timer.isTiming())
1012 timer.start();
1013 } else { 1010 } else {
1014 // the menu is open, keep it firing until it closes 1011 if (! timer.isTiming()) {
1015 timer.fireOnce(false); 1012 // the menu is open, keep it firing until it closes
1016 if (! timer.isTiming()) 1013 if (slitmenu.isVisible())
1014 timer.fireOnce(false);
1017 timer.start(); 1015 timer.start();
1016 }
1018 } 1017 }
1019 1018
1020} 1019}
@@ -1057,10 +1056,14 @@ void Slit::configureRequestEvent(XConfigureRequestEvent &event) {
1057 1056
1058 1057
1059void Slit::timeout() { 1058void Slit::timeout() {
1060 if (!slitmenu.isVisible()) { 1059 if (do_auto_hide) {
1061 timer.fireOnce(true); 1060 if (!slitmenu.isVisible()) {
1061 timer.fireOnce(true);
1062 } else
1063 return;
1062 } else 1064 } else
1063 return; 1065 if (!hidden) return;
1066
1064 hidden = ! hidden; // toggle hidden state 1067 hidden = ! hidden; // toggle hidden state
1065 if (hidden) 1068 if (hidden)
1066 frame.window.move(frame.x_hidden, frame.y_hidden); 1069 frame.window.move(frame.x_hidden, frame.y_hidden);
@@ -1129,6 +1132,12 @@ void Slit::saveClientList() {
1129void Slit::setAutoHide(bool val) { 1132void Slit::setAutoHide(bool val) {
1130 do_auto_hide = val; 1133 do_auto_hide = val;
1131 screen().saveSlitAutoHide(val); 1134 screen().saveSlitAutoHide(val);
1135 if (do_auto_hide)
1136 if (! timer.isTiming()) {
1137 if (slitmenu.isVisible())
1138 timer.fireOnce(false);
1139 timer.start();
1140 }
1132} 1141}
1133 1142
1134void Slit::setupMenu() { 1143void Slit::setupMenu() {