aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Slit.cc11
-rw-r--r--src/Slit.hh2
-rw-r--r--src/Toolbar.cc12
-rw-r--r--src/Toolbar.hh2
4 files changed, 25 insertions, 2 deletions
diff --git a/src/Slit.cc b/src/Slit.cc
index d03f61b..b628d18 100644
--- a/src/Slit.cc
+++ b/src/Slit.cc
@@ -235,6 +235,8 @@ Slit::Slit(BScreen &scr, FbTk::Layer &layer, const char *filename)
235 scr.name() + ".slit.acceptKdeDockapps", scr.altName() + ".Slit.AcceptKdeDockapps"), 235 scr.name() + ".slit.acceptKdeDockapps", scr.altName() + ".Slit.AcceptKdeDockapps"),
236 m_rc_auto_hide(scr.resourceManager().lock(), false, 236 m_rc_auto_hide(scr.resourceManager().lock(), false,
237 scr.name() + ".slit.autoHide", scr.altName() + ".Slit.AutoHide"), 237 scr.name() + ".slit.autoHide", scr.altName() + ".Slit.AutoHide"),
238 m_rc_auto_raise(scr.resourceManager().lock(), false,
239 scr.name() + ".slit.autoRaise", scr.altName() + ".Slit.AutoRaise"),
238 // TODO: this resource name must change 240 // TODO: this resource name must change
239 m_rc_maximize_over(scr.resourceManager(), false, 241 m_rc_maximize_over(scr.resourceManager(), false,
240 scr.name() + ".slit.maxOver", scr.altName() + ".Slit.MaxOver"), 242 scr.name() + ".slit.maxOver", scr.altName() + ".Slit.MaxOver"),
@@ -957,6 +959,9 @@ void Slit::buttonPressEvent(XButtonEvent &be) {
957 959
958 960
959void Slit::enterNotifyEvent(XCrossingEvent &) { 961void Slit::enterNotifyEvent(XCrossingEvent &) {
962 if (m_rc_auto_raise)
963 m_layeritem->moveToLayer(ResourceLayer::ABOVE_DOCK);
964
960 if (! doAutoHide()) 965 if (! doAutoHide())
961 return; 966 return;
962 967
@@ -971,6 +976,9 @@ void Slit::enterNotifyEvent(XCrossingEvent &) {
971 976
972 977
973void Slit::leaveNotifyEvent(XCrossingEvent &ev) { 978void Slit::leaveNotifyEvent(XCrossingEvent &ev) {
979 if (m_rc_auto_raise)
980 m_layeritem->moveToLayer(m_rc_layernum->getNum());
981
974 if (! doAutoHide()) 982 if (! doAutoHide())
975 return; 983 return;
976 984
@@ -1207,6 +1215,9 @@ void Slit::setupMenu() {
1207 m_slitmenu.insertItem(new FbTk::BoolMenuItem(_FB_XTEXT(Common, AutoHide, "Auto hide", "This thing automatically hides when not close by"), 1215 m_slitmenu.insertItem(new FbTk::BoolMenuItem(_FB_XTEXT(Common, AutoHide, "Auto hide", "This thing automatically hides when not close by"),
1208 m_rc_auto_hide, 1216 m_rc_auto_hide,
1209 save_and_reconfigure_slit)); 1217 save_and_reconfigure_slit));
1218 m_slitmenu.insertItem(new FbTk::BoolMenuItem(_FB_XTEXT(Common, AutoRaise, "Auto raise", "This thing automatically raises when entered"),
1219 m_rc_auto_raise,
1220 save_and_reconfigure_slit));
1210 1221
1211 m_slitmenu.insertItem(new FbTk::BoolMenuItem(_FB_XTEXT(Common, MaximizeOver,"Maximize Over", "Maximize over this thing when maximizing"), 1222 m_slitmenu.insertItem(new FbTk::BoolMenuItem(_FB_XTEXT(Common, MaximizeOver,"Maximize Over", "Maximize over this thing when maximizing"),
1212 m_rc_maximize_over, 1223 m_rc_maximize_over,
diff --git a/src/Slit.hh b/src/Slit.hh
index cffc087..0b476b5 100644
--- a/src/Slit.hh
+++ b/src/Slit.hh
@@ -182,7 +182,7 @@ private:
182 static unsigned int s_eventmask; 182 static unsigned int s_eventmask;
183 Strut *m_strut; 183 Strut *m_strut;
184 184
185 FbTk::Resource<bool> m_rc_kde_dockapp, m_rc_auto_hide, m_rc_maximize_over; 185 FbTk::Resource<bool> m_rc_kde_dockapp, m_rc_auto_hide, m_rc_auto_raise, m_rc_maximize_over;
186 FbTk::Resource<Slit::Placement> m_rc_placement; 186 FbTk::Resource<Slit::Placement> m_rc_placement;
187 FbTk::Resource<int> m_rc_alpha, m_rc_on_head; 187 FbTk::Resource<int> m_rc_alpha, m_rc_on_head;
188 FbTk::Resource<class ResourceLayer> m_rc_layernum; 188 FbTk::Resource<class ResourceLayer> m_rc_layernum;
diff --git a/src/Toolbar.cc b/src/Toolbar.cc
index cb52066..23a8244 100644
--- a/src/Toolbar.cc
+++ b/src/Toolbar.cc
@@ -194,6 +194,8 @@ Toolbar::Toolbar(BScreen &scrn, FbTk::Layer &layer, size_t width):
194 // lock rcmanager here 194 // lock rcmanager here
195 m_rc_auto_hide(scrn.resourceManager().lock(), false, 195 m_rc_auto_hide(scrn.resourceManager().lock(), false,
196 scrn.name() + ".toolbar.autoHide", scrn.altName() + ".Toolbar.AutoHide"), 196 scrn.name() + ".toolbar.autoHide", scrn.altName() + ".Toolbar.AutoHide"),
197 m_rc_auto_raise(scrn.resourceManager().lock(), false,
198 scrn.name() + ".toolbar.autoRaise", scrn.altName() + ".Toolbar.AutoRaise"),
197 m_rc_maximize_over(scrn.resourceManager(), false, 199 m_rc_maximize_over(scrn.resourceManager(), false,
198 scrn.name() + ".toolbar.maxOver", scrn.altName() + ".Toolbar.MaxOver"), 200 scrn.name() + ".toolbar.maxOver", scrn.altName() + ".Toolbar.MaxOver"),
199 m_rc_visible(scrn.resourceManager(), true, scrn.name() + ".toolbar.visible", scrn.altName() + ".Toolbar.Visible"), 201 m_rc_visible(scrn.resourceManager(), true, scrn.name() + ".toolbar.visible", scrn.altName() + ".Toolbar.Visible"),
@@ -522,6 +524,9 @@ void Toolbar::buttonPressEvent(XButtonEvent &be) {
522} 524}
523 525
524void Toolbar::enterNotifyEvent(XCrossingEvent &ce) { 526void Toolbar::enterNotifyEvent(XCrossingEvent &ce) {
527 if (m_rc_auto_raise)
528 m_layeritem.moveToLayer(ResourceLayer::ABOVE_DOCK);
529
525 Fluxbox::instance()->keys()->doAction(ce.type, ce.state, 0, 530 Fluxbox::instance()->keys()->doAction(ce.type, ce.state, 0,
526 Keys::ON_TOOLBAR); 531 Keys::ON_TOOLBAR);
527 532
@@ -552,6 +557,9 @@ void Toolbar::leaveNotifyEvent(XCrossingEvent &event) {
552 return; 557 return;
553 } 558 }
554 559
560 if (m_rc_auto_raise)
561 m_layeritem.moveToLayer(m_rc_layernum->getNum());
562
555 Fluxbox::instance()->keys()->doAction(event.type, event.state, 0, 563 Fluxbox::instance()->keys()->doAction(event.type, event.state, 0,
556 Keys::ON_TOOLBAR); 564 Keys::ON_TOOLBAR);
557 565
@@ -762,6 +770,10 @@ void Toolbar::setupMenus(bool skip_new_placement) {
762 "Auto hide", "Toggle auto hide of toolbar"), 770 "Auto hide", "Toggle auto hide of toolbar"),
763 m_rc_auto_hide, 771 m_rc_auto_hide,
764 reconfig_toolbar_and_save_resource)); 772 reconfig_toolbar_and_save_resource));
773 menu().insertItem(new FbTk::BoolMenuItem(_FB_XTEXT(Common, AutoRaise,
774 "Auto raise", "Toggle auto raise of toolbar"),
775 m_rc_auto_raise,
776 reconfig_toolbar_and_save_resource));
765 777
766 MenuItem *toolbar_menuitem = 778 MenuItem *toolbar_menuitem =
767 new FbTk::IntMenuItem(_FB_XTEXT(Toolbar, WidthPercent, 779 new FbTk::IntMenuItem(_FB_XTEXT(Toolbar, WidthPercent,
diff --git a/src/Toolbar.hh b/src/Toolbar.hh
index a1631bd..47569f6 100644
--- a/src/Toolbar.hh
+++ b/src/Toolbar.hh
@@ -185,7 +185,7 @@ private:
185 Strut *m_strut; ///< created and destroyed by BScreen 185 Strut *m_strut; ///< created and destroyed by BScreen
186 186
187 // resources 187 // resources
188 FbTk::Resource<bool> m_rc_auto_hide, m_rc_maximize_over, m_rc_visible; 188 FbTk::Resource<bool> m_rc_auto_hide, m_rc_auto_raise, m_rc_maximize_over, m_rc_visible;
189 FbTk::Resource<int> m_rc_width_percent; 189 FbTk::Resource<int> m_rc_width_percent;
190 FbTk::Resource<int> m_rc_alpha; 190 FbTk::Resource<int> m_rc_alpha;
191 FbTk::Resource<class ResourceLayer> m_rc_layernum; 191 FbTk::Resource<class ResourceLayer> m_rc_layernum;