summaryrefslogtreecommitdiff
path: root/src/Toolbar.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Toolbar.cc')
-rw-r--r--src/Toolbar.cc26
1 files changed, 14 insertions, 12 deletions
diff --git a/src/Toolbar.cc b/src/Toolbar.cc
index 101900a..73a8650 100644
--- a/src/Toolbar.cc
+++ b/src/Toolbar.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: Toolbar.cc,v 1.59 2003/02/18 15:11:09 rathnor Exp $ 25// $Id: Toolbar.cc,v 1.60 2003/02/22 23:07:23 fluxgen Exp $
26 26
27#include "Toolbar.hh" 27#include "Toolbar.hh"
28 28
@@ -64,9 +64,6 @@
64#endif // HAVE_SYS_TIME_H 64#endif // HAVE_SYS_TIME_H
65#endif // TIME_WITH_SYS_TIME 65#endif // TIME_WITH_SYS_TIME
66 66
67#ifdef SHAPE
68#include <X11/extensions/shape.h>
69#endif // SHAPE
70 67
71#include <iostream> 68#include <iostream>
72 69
@@ -110,7 +107,7 @@ void setupMenus(Toolbar &tbar) {
110Toolbar::Frame::Frame(FbTk::EventHandler &evh, int screen_num): 107Toolbar::Frame::Frame(FbTk::EventHandler &evh, int screen_num):
111 window(screen_num, // screen (parent) 108 window(screen_num, // screen (parent)
112 0, 0, // pos 109 0, 0, // pos
113 1, 1, // size 110 10, 10, // size
114 // event mask 111 // event mask
115 ButtonPressMask | ButtonReleaseMask | 112 ButtonPressMask | ButtonReleaseMask |
116 EnterWindowMask | LeaveWindowMask, 113 EnterWindowMask | LeaveWindowMask,
@@ -120,19 +117,22 @@ Toolbar::Frame::Frame(FbTk::EventHandler &evh, int screen_num):
120 1, 1, // size 117 1, 1, // size
121 // event mask 118 // event mask
122 ButtonPressMask | ButtonReleaseMask | 119 ButtonPressMask | ButtonReleaseMask |
123 ExposureMask | KeyPressMask), 120 ExposureMask | KeyPressMask |
121 EnterWindowMask | LeaveWindowMask),
124 window_label(window, // parent 122 window_label(window, // parent
125 0, 0, // pos 123 0, 0, // pos
126 1, 1, // size 124 1, 1, // size
127 // event mask 125 // event mask
128 ButtonPressMask | ButtonReleaseMask | 126 ButtonPressMask | ButtonReleaseMask |
129 ExposureMask), 127 ExposureMask |
130 clock (window, //parent 128 EnterWindowMask | LeaveWindowMask),
129 clock(window, //parent
131 0, 0, // pos 130 0, 0, // pos
132 1, 1, // size 131 1, 1, // size
133 // event mask 132 // event mask
134 ButtonPressMask | ButtonReleaseMask | 133 ButtonPressMask | ButtonReleaseMask |
135 ExposureMask), 134 ExposureMask |
135 EnterWindowMask | LeaveWindowMask),
136 psbutton(ArrowButton::LEFT, // arrow type 136 psbutton(ArrowButton::LEFT, // arrow type
137 window, // parent 137 window, // parent
138 0, 0, // pos 138 0, 0, // pos
@@ -177,13 +177,13 @@ Toolbar::Toolbar(BScreen &scrn, FbTk::XLayer &layer, size_t width):
177 image_ctrl(*scrn.getImageControl()), 177 image_ctrl(*scrn.getImageControl()),
178 clock_timer(this), // get the clock updating every minute 178 clock_timer(this), // get the clock updating every minute
179 hide_timer(&hide_handler), 179 hide_timer(&hide_handler),
180 m_toolbarmenu(*scrn.menuTheme(), scrn.getScreenNumber(), *scrn.getImageControl()), 180 m_toolbarmenu(*scrn.menuTheme(),
181 scrn.getScreenNumber(), *scrn.getImageControl()),
181 m_layermenu(0), 182 m_layermenu(0),
182 m_theme(scrn.getScreenNumber()), 183 m_theme(scrn.getScreenNumber()),
183 m_place(BOTTOMCENTER), 184 m_place(BOTTOMCENTER),
184 m_themelistener(*this), 185 m_themelistener(*this),
185 m_layeritem(0) 186 m_layeritem(0) {
186{
187 187
188 m_layermenu = new LayerMenu<Toolbar>( 188 m_layermenu = new LayerMenu<Toolbar>(
189 *scrn.menuTheme(), 189 *scrn.menuTheme(),
@@ -524,6 +524,7 @@ void Toolbar::reconfigure() {
524 frame.window.setBorderWidth(screen().getBorderWidth()); 524 frame.window.setBorderWidth(screen().getBorderWidth());
525 525
526 frame.window.clear(); 526 frame.window.clear();
527
527 frame.workspace_label.clear(); 528 frame.workspace_label.clear();
528 frame.window_label.clear(); 529 frame.window_label.clear();
529 frame.clock.clear(); 530 frame.clock.clear();
@@ -1082,6 +1083,7 @@ void Toolbar::HideHandler::timeout() {
1082 toolbar->hide_timer.start(); // restart timer and try next timeout 1083 toolbar->hide_timer.start(); // restart timer and try next timeout
1083 return; 1084 return;
1084 } 1085 }
1086
1085 toolbar->hide_timer.fireOnce(true); 1087 toolbar->hide_timer.fireOnce(true);
1086 1088
1087 toolbar->hidden = ! toolbar->hidden; 1089 toolbar->hidden = ! toolbar->hidden;