aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Slit.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/Slit.cc b/src/Slit.cc
index 861a7f7..c2054a6 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.76 2003/08/04 12:53:10 fluxgen Exp $ 25// $Id: Slit.cc,v 1.77 2003/08/11 16:05:18 fluxgen Exp $
26 26
27#include "Slit.hh" 27#include "Slit.hh"
28 28
@@ -234,7 +234,7 @@ unsigned int Slit::s_eventmask = SubstructureRedirectMask | ButtonPressMask |
234 234
235Slit::Slit(BScreen &scr, FbTk::XLayer &layer, const char *filename) 235Slit::Slit(BScreen &scr, FbTk::XLayer &layer, const char *filename)
236 : m_hidden(false), 236 : m_hidden(false),
237 m_screen(scr), m_timer(this), 237 m_screen(scr),
238 m_slitmenu(*scr.menuTheme(), 238 m_slitmenu(*scr.menuTheme(),
239 scr.screenNumber(), 239 scr.screenNumber(),
240 scr.imageControl(), 240 scr.imageControl(),
@@ -283,12 +283,13 @@ Slit::Slit(BScreen &scr, FbTk::XLayer &layer, const char *filename)
283 283
284 284
285 frame.pixmap = None; 285 frame.pixmap = None;
286 286 // setup timer
287 m_timer.setTimeout(200); // default timeout 287 m_timer.setTimeout(200); // default timeout
288 m_timer.fireOnce(true); 288 m_timer.fireOnce(true);
289 FbTk::RefCount<FbTk::Command> toggle_hidden(new FbTk::SimpleCommand<Slit>(*this, &Slit::toggleHidden));
290 m_timer.setCommand(toggle_hidden);
289 291
290 // create main window 292 // create main window
291
292 XSetWindowAttributes attrib; 293 XSetWindowAttributes attrib;
293 unsigned long create_mask = CWBackPixmap | CWBackPixel | CWBorderPixel | 294 unsigned long create_mask = CWBackPixmap | CWBackPixel | CWBorderPixel |
294 CWColormap | CWOverrideRedirect | CWEventMask; 295 CWColormap | CWOverrideRedirect | CWEventMask;
@@ -1098,7 +1099,7 @@ void Slit::clearWindow() {
1098 1099
1099} 1100}
1100 1101
1101void Slit::timeout() { 1102void Slit::toggleHidden() {
1102 if (doAutoHide()) { 1103 if (doAutoHide()) {
1103 if (!m_slitmenu.isVisible()) { 1104 if (!m_slitmenu.isVisible()) {
1104 m_timer.fireOnce(true); 1105 m_timer.fireOnce(true);