all repos — fluxbox @ fe8ff8729299a4fd4371394d3ca9102ece22fefb

custom fork of the fluxbox windowmanager

add autoraising to toolbar and slit
Thomas Lübking thomas.luebking@gmail.com
commit

fe8ff8729299a4fd4371394d3ca9102ece22fefb

parent

6c0565c482b496b7d34e3731415829e7c4872535

6 files changed, 46 insertions(+), 2 deletions(-)

jump to
M doc/asciidoc/fluxbox.txtdoc/asciidoc/fluxbox.txt

@@ -604,6 +604,11 @@ mouse pointer leaves the toolbar. It will slide in when the cursor hits the

remaining edge of the toolbar. See the *session.autoRaiseDelay* resource for the delay time. +*Auto raise*::: + If this is enabled the toolbar will elevate after a defined time when the + mouse pointer enters the it. It will fall back when the cursor leaves the + toolbar. See the *session.autoRaiseDelay* resource for the delay time. + *Toolbar width percentage*::: Sets the width of the toolbar in a percentage of your total screen size. Use the left mouse button to decrease and the right mouse-button to increase the

@@ -796,6 +801,11 @@ mouse pointer leaves the slit. It will slide in when the cursor hits the

remaining edge of the slit. See the *session.autoRaiseDelay* resource for the delay time. +*Auto raise*::: + If this is enabled the slit will elevate after a defined time when the + mouse pointer enters the it. It will fall back when the cursor leaves the + slit. See the *session.autoRaiseDelay* resource for the delay time. + *Maximize Over*::: Enabling this option will allow windows to maximizing over the slit. With this switched off they will only expand to the edge of the slit. This

@@ -883,6 +893,16 @@ *session.screen0.{slit|toolbar}.autoHide*: 'boolean'::

The autoHide resources allow the user to set the behavior of the toolbar and slit. This behavior can be that they disappear when they are not being used actively by the user, or they remain visible at all times. ++ +Default: *False* + +*session.screen0.{slit|toolbar}.autoRaise*: 'boolean':: +If enabled, the respective item will elevate to the AboveDock layer when entered +and fall back to its regular layer when left. +Notice that this does *not* implicitly alter the items regular layer or the +workspace padding, ie. if the item is already set to AboveDock this does nothing +and if a mximized window completely covers the item you won't be able to enter, +thus elevate it. + Default: *False*
M nls/fluxbox-nls.hhnls/fluxbox-nls.hh

@@ -54,6 +54,7 @@ CommonSvnRevision = 17,

CommonVisible = 18, CommonBackgroundWarning = 19, CommonDefaultWindowMenuFile = 20, + CommonAutoRaise = 21, ConfigmenuSet = 4, ConfigmenuAntiAlias = 1,
M src/Slit.ccsrc/Slit.cc

@@ -235,6 +235,8 @@ m_rc_kde_dockapp(scr.resourceManager(), true,

scr.name() + ".slit.acceptKdeDockapps", scr.altName() + ".Slit.AcceptKdeDockapps"), m_rc_auto_hide(scr.resourceManager().lock(), false, scr.name() + ".slit.autoHide", scr.altName() + ".Slit.AutoHide"), + m_rc_auto_raise(scr.resourceManager().lock(), false, + scr.name() + ".slit.autoRaise", scr.altName() + ".Slit.AutoRaise"), // TODO: this resource name must change m_rc_maximize_over(scr.resourceManager(), false, scr.name() + ".slit.maxOver", scr.altName() + ".Slit.MaxOver"),

@@ -957,6 +959,9 @@ }

void Slit::enterNotifyEvent(XCrossingEvent &) { + if (m_rc_auto_raise) + m_layeritem->moveToLayer(ResourceLayer::ABOVE_DOCK); + if (! doAutoHide()) return;

@@ -971,6 +976,9 @@ }

void Slit::leaveNotifyEvent(XCrossingEvent &ev) { + if (m_rc_auto_raise) + m_layeritem->moveToLayer(m_rc_layernum->getNum()); + if (! doAutoHide()) return;

@@ -1206,6 +1214,9 @@ #endif //XINERAMA

m_slitmenu.insertItem(new FbTk::BoolMenuItem(_FB_XTEXT(Common, AutoHide, "Auto hide", "This thing automatically hides when not close by"), m_rc_auto_hide, + save_and_reconfigure_slit)); + m_slitmenu.insertItem(new FbTk::BoolMenuItem(_FB_XTEXT(Common, AutoRaise, "Auto raise", "This thing automatically raises when entered"), + m_rc_auto_raise, save_and_reconfigure_slit)); m_slitmenu.insertItem(new FbTk::BoolMenuItem(_FB_XTEXT(Common, MaximizeOver,"Maximize Over", "Maximize over this thing when maximizing"),
M src/Slit.hhsrc/Slit.hh

@@ -182,7 +182,7 @@ std::auto_ptr<SlitTheme> m_slit_theme;

static unsigned int s_eventmask; Strut *m_strut; - FbTk::Resource<bool> m_rc_kde_dockapp, m_rc_auto_hide, m_rc_maximize_over; + FbTk::Resource<bool> m_rc_kde_dockapp, m_rc_auto_hide, m_rc_auto_raise, m_rc_maximize_over; FbTk::Resource<Slit::Placement> m_rc_placement; FbTk::Resource<int> m_rc_alpha, m_rc_on_head; FbTk::Resource<class ResourceLayer> m_rc_layernum;
M src/Toolbar.ccsrc/Toolbar.cc

@@ -194,6 +194,8 @@ m_strut(0),

// lock rcmanager here m_rc_auto_hide(scrn.resourceManager().lock(), false, scrn.name() + ".toolbar.autoHide", scrn.altName() + ".Toolbar.AutoHide"), + m_rc_auto_raise(scrn.resourceManager().lock(), false, + scrn.name() + ".toolbar.autoRaise", scrn.altName() + ".Toolbar.AutoRaise"), m_rc_maximize_over(scrn.resourceManager(), false, scrn.name() + ".toolbar.maxOver", scrn.altName() + ".Toolbar.MaxOver"), m_rc_visible(scrn.resourceManager(), true, scrn.name() + ".toolbar.visible", scrn.altName() + ".Toolbar.Visible"),

@@ -522,6 +524,9 @@ .placeAndShowMenu(menu(), be.x_root, be.y_root, false);

} void Toolbar::enterNotifyEvent(XCrossingEvent &ce) { + if (m_rc_auto_raise) + m_layeritem.moveToLayer(ResourceLayer::ABOVE_DOCK); + Fluxbox::instance()->keys()->doAction(ce.type, ce.state, 0, Keys::ON_TOOLBAR);

@@ -551,6 +556,9 @@ event.y_root > y() && event.y_root <= (int)(y() + height()) &&

event.subwindow == None ) { return; } + + if (m_rc_auto_raise) + m_layeritem.moveToLayer(m_rc_layernum->getNum()); Fluxbox::instance()->keys()->doAction(event.type, event.state, 0, Keys::ON_TOOLBAR);

@@ -761,6 +769,10 @@

menu().insertItem(new FbTk::BoolMenuItem(_FB_XTEXT(Common, AutoHide, "Auto hide", "Toggle auto hide of toolbar"), m_rc_auto_hide, + reconfig_toolbar_and_save_resource)); + menu().insertItem(new FbTk::BoolMenuItem(_FB_XTEXT(Common, AutoRaise, + "Auto raise", "Toggle auto raise of toolbar"), + m_rc_auto_raise, reconfig_toolbar_and_save_resource)); MenuItem *toolbar_menuitem =
M src/Toolbar.hhsrc/Toolbar.hh

@@ -185,7 +185,7 @@

Strut *m_strut; ///< created and destroyed by BScreen // resources - FbTk::Resource<bool> m_rc_auto_hide, m_rc_maximize_over, m_rc_visible; + FbTk::Resource<bool> m_rc_auto_hide, m_rc_auto_raise, m_rc_maximize_over, m_rc_visible; FbTk::Resource<int> m_rc_width_percent; FbTk::Resource<int> m_rc_alpha; FbTk::Resource<class ResourceLayer> m_rc_layernum;