aboutsummaryrefslogtreecommitdiff
path: root/src/Toolbar.cc
AgeCommit message (Collapse)AuthorFilesLines
2016-09-03hide menus when clicking title or toolbarThomas Lübking1-0/+3
BUG: 1149
2016-08-27Replay toolbar button eventsThomas Lübking1-2/+28
NOTICE!!!! THIS IS HIGHLY EXPERIMENTAL! The patch alters the button grab mode to GrabSync in order to ReplayPointer the event. THIS CAN FREEZE ANY INPUT TO FLUXBOX!!! The toolbar (and other things?) grab buttons in order to handle MouseN events for the entire bar, INCLUDING all child windows. This causes two problems: 1. The bar handles events which are not meant for fluxbox at all (but the systray icons) BUG: 940 2. The bar will intercept (and suck) *every* press, even if only doubleclicks are desired BUG: 949 The problem with this patch is that an oversight here has the potential to completely freeze input event processing in fluxbox (ie. the process needs to be killed from outside), SO IT NEEDS TESTING! As much as possible.
2016-08-26catch absurd but possible div-by-zeroThomas Lübking1-1/+1
2016-08-26allow to alter button labels via fluxbox-remoteThomas Lübking1-5/+8
Command is "RelabelButton button.foo $LABEL" This is useful to eg. hint the amount of unread mails in a button to start your MUA, reflect the $USER in a session menu button etc.
2016-08-26Fix autohiding/raising timer logicsThomas Lübking1-37/+31
Trying to control a timer bound to an unconditional toggle, caused by opposing events does not work. <- That's a period. The toolbar implementation would act too seldom, the slit to often. Instead, fire the timer whenever the state does not match the event and bind it to a function that queries the pointer position and acts accordingly.
2016-08-26add autoraising to toolbar and slitThomas Lübking1-0/+12
2016-08-26add commands to toggle toolbar and slit layerThomas Lübking1-0/+7
toggle(Toolbar|Slit)Above toggles the resp. item between its regular and the AboveDock layer (ie. above everything, even visible on active fullscreen windows) Also required step for autoraising. REQUEST: 222
2016-08-26Improve stretching (RELATIVE) toolbar itemsThomas Lübking1-15/+18
The available space is distributed reg. the preferred width of items (spacers and the iconbar ;-) instead of evenly. The preferred width of the iconbar is calculated from its buttons. This allows to align the iconbar using spacers and makes better use of the available space
2015-05-14Fix hidden toolbar placementPeter Ganzhorn1-3/+11
2015-05-01Fix RIGHTCENTER placement of the toolbar. Instead of subtracting borderwidth ↵Peter Ganzhorn1-1/+1
(bw) from (frame.height))/2 they were multiplied causing wrong placement for this case.
2015-05-01Shape only toolbar corners not touching any edges of the screen. It just ↵Peter Ganzhorn1-12/+12
looks better this way.
2015-05-01Fix shaped toolbar being drawn incorrectly at TOPCENTER Fix round corners ↵Peter Ganzhorn1-10/+10
being drawn incorrectly on the TOP instead BOTTOM of the toolbar when toolbar placement is TOPCENTER. Also align the _values[] table a bit more nicely to make it easier to spot bugs like this. The bug was introduced in commit 67c31b49bdeab40fea37719cd6cfa06b37507e3e 'Refactor Toolbar.cc, less noise'.
2015-01-23Refactor Toolbar.cc, less noiseMathias Gumz1-148/+80
2015-01-15Refactor menu code: be more explicit and compactMathias Gumz1-19/+22
This commit is a preparation step for some menu cleanup ahead. To make it easier to understand which types of MenuItems are added where and when, I converted the overloaded FbTk::Menu::insert() functions into explicit ones (Menu::insertSubmenu(), Menu::insertItem(), etc. ). This makes it possible to just grep for 'insertSubmenu()'. Side effect this commit: it trims down the very verbose creation of menu items in regards to how the labels are created. Minor: FbTk::Menu::shown and FbTk::Menu::s_focused are moved out of the class.
2013-05-26build-sys: use AC_USE_SYSTEM_EXTENSIONSSami Kerola1-5/+0
The earlier _GNU_SOURCE definitions possibly did not take effect everywhere where it was intended.
2013-05-26build-sys: include config.h to all files using automakeSami Kerola1-4/+0
Do not try to be too smart which compilations need config.h, as most of them will simply because of the config.h has information about system capabilities.
2013-02-27minor code simplificationsMathias Gumz1-8/+2
2013-02-27Workspace switching on the toolbar via the mouse buttonsSoeren Beye1-1/+1
2012-12-30Set WM_WINDOW_ROLE for fluxbox windowsVladimir A. Pavlov1-0/+2
2012-10-03Improved vertical alignment of text in FbTk::TextButtonMathias Gumz1-2/+0
The old formula for vertical align text inside FbTk::TextButton ('height/2 + font_ascent/2 - 1') produced not always good looking results, escpecially when different fonts are involved (eg, ClockTool and WorkspaceName have different fonts and font-sizes). '(height - font_ascent) / 2 - 1' produces better results. Additional changes: * added ASCII-Art to document the involved entities when calculating the baseline * rewritten tests/testFont.cc to accept multiples texts and multiple fonts * removed some internal parts of FbTk::Font from the public interface
2012-08-28changed timing functions to use a monotonic increasing clockMathias Gumz1-1/+1
gettimeofday() is subject to be changed on daylight-saving or to ntp-related (think leap-seconds). even worse, it is subject to be changed BACK in time. this is hard to fix correctly (see commit 45726d3016e and bug #3560509). it is irrelevant for timers to know the nano-seconds since the epoch anyways.
2011-05-10Convert ToolbarItem::resizeSig to FbTk::SignalPavel Labath1-6/+2
2011-05-10Convert Screen::reconfigureSig to FbTk::SignalPavel Labath1-2/+5
2011-05-10Convert FbTk::Theme::reconfigSig and friends to the new Signal systemPavel Labath1-1/+1
I removed the const versions of reconfigSig() in the process since FbTk::Signal has no const methods anyway.
2011-03-23compile fix: sunCC 5.11 (sunstudio 12) compiles and links againMathias Gumz1-5/+5
biggest change: renaming of 'class Layer' to 'class ResourceLayer' in Layer.hh to handle complaints about 'ambiguous Layer: Layer or FbTk::Layer'. 'ResourceLayer' sounds crappy, but that was the best I could come up with right now.
2011-03-01fix misordered Toolbar::Placement strings, closes 3195721Mathias Gumz1-3/+3
2011-02-24moved Menu placement into ScreenPlacement::placeAndShowMenu()Mathias Gumz1-16/+4
2011-02-23renamed FbTk::XLayer to FbTk::Layer and FbTk::XLayerItem to FbTk::LayerItemMathias Gumz1-1/+1
2011-02-23disabled overhead base classes 'FbTk::Layer' and 'FbTk::LayerItem'Mathias Gumz1-0/+1
had to add <algorithm> at various other files as a result of this change.
2011-01-16compile fix, new name of setMinimumSublevels() is setMinimumColumns()Mathias Gumz1-1/+1
2010-09-17code simplification by reducing if-else hellMathias Gumz1-66/+38
a lot of the parsing-related and menu-building stuff is just plain stupid boiler plate code. putting the data into a const array separates the boiler plate data from the actual code.
2010-09-15use hardcoded array for hardcoded placement menu defaultsMathias Gumz1-30/+28
2010-09-15removed useless codeMathias Gumz1-4/+0
'tools' is transformed to lower case some lines above, 'm_tools_ is a copy of the lower cased 'tools'.
2010-09-15code deduplication by using <algorithm> and FbTk/STLUtil.hhMathias Gumz1-17/+8
2010-05-23mostly cosmetic fixes, mainly discovered by 'clang --analyze'Mathias Gumz1-31/+32
reordering of Resource-related stuff was because of "error: explicit specialization of 'getString' after instantiation" complaints.
2009-09-30cosmetic fixes: removed redundant ';' + some whitespacesMathias Gumz1-1/+1
2009-07-24make autohide only show the border or 1 pixel if borderlessMark Tiefenbruck1-18/+15
2009-06-28change default toolbar tools to:Mark Tiefenbruck1-1/+1
prevworkspace, workspacename, nextworkspace, iconbar, systemtray, clock
2009-06-28change default toolbar head from 0 to 1Mark Tiefenbruck1-1/+1
2008-10-19increase default size of toolbar and icon buttonsMark Tiefenbruck1-1/+1
2008-09-28Changed resize signal in BScreen to use the new signal systemHenrik Kinnunen1-1/+8
2008-09-08update workspace names atoms/resources when adding a new workspaceMark Tiefenbruck1-1/+1
also removed unnecessary items from default init file
2008-08-24toolbar placement menu wasn't updatingMark Tiefenbruck1-0/+1
2008-08-04add selection box to various "choose one of these" menu itemsMark Tiefenbruck1-10/+15
2008-04-27Added SimpleObserver class.Henrik Kinnunen1-21/+16
This class works in the same way as the SimpleCommand class. Use it with the makeObserver function. It calls the receiver's member function when the subject sends a signal.
2008-03-29fixed a small issue with autohidden toolbarMathias Gumz1-2/+8
the toolbar was not going to hidden state when the slit covered the toolbar and the mouse was still in the toolbar area. now we check event.subwindow to decide if it was a "valid" leaveNotifyEvent.
2008-02-11more fun with the window menuMark Tiefenbruck1-12/+1
2008-01-27"On head" menu -- reloading and refreshing bugfix.Tomas Janousek1-4/+8
We should reload the contents of this menu on Xinerama layout change. I switched it from FbMenu to ToggleMenu, because the selected head wasn't being updated properly. Signed-off-by: Tomas Janousek <tomi@nomi.cz>
2008-01-22fix some issues with window menusMark Tiefenbruck1-1/+13
2008-01-15split Text.hh into Orientation.hh and TextUtils.{cc,hh}Mathias Gumz1-0/+1