aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk
AgeCommit message (Collapse)AuthorFilesLines
2022-07-31Fix infinite loop in Menu::cycleitems()Mathias Gumz1-6/+15
When a menu contains no selectable item (example given: a "list" of user styles and the only available one is already selected), cycling through the menu will lead to an infinite loop and thus a disfunctional fluxbox. This commit addresses the issue by checking if there is any selectable item before entering the cycling stage. Discovered by Sébastien Ballet[1]. [1]: https://sourceforge.net/p/fluxbox/bugs/1185/
2022-04-18fix: Warn & attempt fallback for unsupported locale in text property conversionGlen Whitney1-22/+28
2021-07-06Patch from Denis GantsevMark Tiefenbruck1-0/+4
Fluxbox would segfault when no fonts were available. Now it just exits with an error.
2021-07-06Patch from Bo Simonsen.Mark Tiefenbruck2-2/+9
Improve switching between 12H and 24H in Clock Tool configuration Having: session.screen0.strftimeFormat: %d-%m-%y %02k:%M The switch[1] between 12H and 24H did not work due to the digits (02).
2021-07-06Patch from Bo Simonsen.Mark Tiefenbruck2-4/+5
Max size per client (setMaxSizePerClient) was computed for iconbar.alignment = Relative not taking into account that a fixed size can be given when iconbar.alignment = Left/Right. In a "recent" change, relative alignment was changed, to better handle items with long titles. This is breaking existing behavior, the new behavior is (with this commit) now denoted RelativeSmart.
2019-08-06explicitly expect unsigned intChristian Hesse1-1/+1
This fixes: src/FbTk/XftFontImp.cc: In member function ‘virtual bool FbTk::XftFontImp::load(const string&)’: src/FbTk/XftFontImp.cc:81:53: error: no matching function for call to ‘max(unsigned int, int)’
2019-07-07zero check now uses std::max()ryluchs171-2/+2
2019-07-06removed potential division by zero with size zero fontsRyan Luchs1-1/+1
2018-03-14fbtk, textbox, support horizontal paddingPete Beardmore2-13/+36
-add 'setPadding' function
2018-03-14fbtk, textbox, overflow selection deselectionPete Beardmore1-2/+27
changes the selection's deselection mechanism for oversized (e.g larger than window width) text new behaviour ensures the maximum selection width remains whilst the selection length is 'oversized'. only when the selection length has a width less than the window width will the selection (i.e. the highlight / inverted colours) reduce in size this is in contrast to the existing approach which would immediately decrease an oversized selection down to nothing visually, leaving the remainder of the selection 'off screen'. this 'looks like nothing is selected' when in fact it is, gives a poor UX
2018-03-14fbtk, textbox, fix selection release on clickPete Beardmore1-0/+2
2018-03-14fbtk, textbox, limit selection height to font sizePete Beardmore1-1/+1
2018-03-14fbtk, textbox, fix cursor position and sizePete Beardmore1-1/+1
-use font height for cursor -prefer 'descent to ascent' coverage as opposed to 'baseline plus way too high'!
2018-03-14fbtk, textbox, fix text vertical centeringPete Beardmore1-1/+1
2016-10-09prevent range overflowThomas Lübking1-1/+1
whenever dealing with unsigned, there's better no "-" in the line ...
2016-10-02attempt a more fair container item squeezingThomas Lübking1-0/+29
Ein Schrumpffreibetrag, faktisch schon Kommunismus ;-) When short on space, items would be squeezed evenly, but this can turn "a" and "a very long item with useless information text" into "a very long item" and "", so in a pre-pass we check whether some very large items cause the shortage and preferably squeeze them.
2016-09-21button: export pressed state and assigned commandsThomas Lübking1-0/+7
latter protected only.
2016-09-11Improve utf-8 supportThomas Lübking1-44/+41
Operate on inverse iscntrl check which allows us to avoid wide character conversions.
2016-09-11support ctrl+a for selecting allThomas Lübking1-0/+5
2016-09-11Support editing utf-8 text in TextBoxThomas Lübking5-23/+113
aka "Flüxbøx" βµγ, pardon, BUG: 720
2016-08-28fix compiler warning about std::auto_ptrMathias Gumz7-10/+9
fluxbox uses std::unique_ptr<> where it previously used std::auto_ptr<>. C++0X was approved in 2011. among other things, it deprecates std::auto_ptr. 5 years is long enough for compilers to catch up the standard.
2016-08-27Grab keyboard synchronouosly to allow replaysThomas Lübking1-1/+1
This allows to catch if a grabbed key (combo) is actually w/o effect (because eg. the OnDesktop condition does not match) and then replay the event ungrabbed to pass it to the focused client. Just like mouse grabbing, this BEARS THE POTENTIAL TO LOCK INPUT, thus needs AS MUCH TESTING AS POSSIBLE BUG: 1137
2016-08-27Replay toolbar button eventsThomas Lübking1-1/+1
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-06Adjust RELATIVE ::repositionItems (more relative)Thomas Lübking2-8/+29
The evenly distributed space causes a lot of whitespace and otoh. cut items, so we use the items internal size as indicator IF the item is a textbutton (the regular usecase in fluxbox) Also publish the function to be triggered from outside (because the caller can, in theory, much better compress several text changes)
2016-08-06expose a preferredWidth of *Button'sThomas Lübking3-0/+7
2016-07-23clear selection on text inputThomas Lübking1-0/+1
Entering upcase chars would auto-select them Seems I don't need upcase chars very often ;-)
2016-07-03smart handling of NotifyUngrab crossing eventsThomas Lübking1-3/+1
closing a keyboard driven popup had the sideeffect to return the focus where the pointer is, regardless of whether that window had the focus before (due to a NotifyUngrab crossing event), bug #597 This was resolved by simply ignoring NotifyUngrab mode crossings, but that had the unfortunate sideeffects to break focus passing when the mouse was actually moved (in a DnD operation, 730) or the focus shall be passed on for strict mouse focus and a mouse triggered lower action (1012) So instead we record the window that was last entered by a *real* crossing and only ignore the NotifyUngrab event if this window didn't change. BUG: 1012 BUG: 730 CCBUG: 597
2016-07-01ignore font for empty title height calculationThomas Lübking3-22/+23
and align calculation on init and reconfigure As a result, if a menu has no label, the title height is determined only by menu.titleHeight (and the border sizes), not by the unused font.
2016-07-01add _NET_WM_NAME to FbWindow::setNameThomas Lübking1-0/+8
since fluxbox is a f**** WM it should be able to use f**** NETWM hints in its toolkit ;-) CCBUG: 702 (does not fix input)
2016-05-28improve consistencyMathias Gumz2-9/+10
for a std::string::size_type, the right value to use is not "-1", but std::string::npos.
2016-05-28fix broken text selection for FbTk::TextBoxMathias Gumz1-1/+2
uninitialized variables cause all kind of problems.
2016-04-25Fix menus over a single column wideJuan Gonzalez Lopez1-3/+4
Fixes menus more than 1 column wide (such as the Placement menus for the Toolbar/Slit/Tabs) which stopped working with commit 3e4570b.
2016-04-25Allow text selectionThomas Lübking2-62/+151
FbTk::TextBox now acts like any contemporary input field ;-)
2016-02-28Mixed relative and absolute values for appsArkadiusz Bokowy1-2/+33
Allow setting relative value for x and y or width and height separately in the apps configuration file. This makes these settings compatible with ones available in the keys file. Previous buggy behavior: If someone has specified, e.g. "[Dimensions] {50% 100}" it was parsed as "{50% 100%}" not as "{50% 100px}" which was inconsistent with the "keys" configuration file. From now on it is possible to write something like this: [app] [Position] (RIGHT) {50% 0} [Dimensions] {300 100%} [end] Signed-off-by: Arkadiusz Bokowy <arkadiusz.bokowy@gmail.com>
2016-01-04merge pull-request 14Mathias Gumz1-0/+2
2015-05-02Simplify codeMathias Gumz2-20/+22
* assume 'pattern' to always be lowercase * rename some variables
2015-05-02Fix bug in detecting text in MenuSearchMathias Gumz1-1/+1
A bug sneaked into my implementation of Boyer-Moore-Horspool. This lead to not finding certain patterns. Given the text 'abcdde' and the pattern 'dd', the faulty implementation would not find 'dd': 1. 'ab' does not match, skip 2 (length of pattern) 2. 'cd' does not match, skip 2 (length of pattern) <- the bug. 3. 'de' does not match, end of string The bug in step 2 is to not use 'd' to detect how far to skip but to use 'c' (which is not in the skip-table) and thus 2 bytes are skipped).
2015-05-01Make sure render new styles into full menuLajos Koszti1-0/+2
Different styles makes the menu width different. When the original menu width is bigger than the newly selected style's width, the rendering produces pretty strange effects: The old style's frame not cleared, so it was rendered and visible next to the new style edge. With this change, the menu width will be as wide as the widest menu item. Style switching still not perfect, because the height of a menu item is from the "first" selected menu, also font color are not updated.
2015-05-01roll back 7e17056: m_index does not exist anymoreMathias Gumz1-6/+1
m_index was removed in 03ce82a.
2015-05-01TextBox::textStartPos can be const.Mario J. Rugiero1-1/+1
2015-05-01Make Layer::getLayerNum() const.Mario J. Rugiero1-1/+1
2015-05-01Initialize m_index in MenuItem's constructors.Mario J. Rugiero1-1/+6
2015-05-01Reduce the scope of the variable err in stringTokensBetween.Mario J. Rugiero1-2/+2
2015-04-11Don't assume ICONV_NULL = 0Casey Dahlin1-5/+9
We define the value ICONV_NULL = -1, but when we attempt to set the s_iconv_convs array to all NULL values, we zero the array instead of setting its entries to -1. This patch properly initializes and wipes s_iconv_convs.
2015-02-08Move internal code to internal side of FbTk::TransparentMathias Gumz2-20/+23
2015-02-07MinorMathias Gumz1-2/+2
2015-02-07Show toggleitems in menuMathias Gumz1-5/+7
2015-02-07CosmeticMathias Gumz1-27/+36
2015-02-07BoyscoutingMathias Gumz2-4/+0
2015-02-07Fix cleaning exposed menu itemsMathias Gumz1-30/+24