aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk
AgeCommit message (Collapse)AuthorFilesLines
2011-02-22Bugfix: don't render textures with dimension of 0Mathias Gumz1-1/+4
At least 'invertRGB()' does not like 'width' or 'height' being 0. 341b2f43e511e39dd was triggered by this problem as well.
2011-02-21Fix bug: 'src_image' might be NULL if width||height are 0 (#3188223)Mathias Gumz1-40/+49
With ROT90-SystemTray fluxbox crashed. It is a bit unclear of where to catch pixmaps / windows with either width or height equal to 0; IMHO this needs more investigation.
2011-02-20Fixed a possible crash when using a slot m_holder = 0Henrik Kinnunen1-5/+9
2011-01-18bug fix: make fluxbox work under nxserver, closes #2813828Mathias Gumz1-0/+50
nxserver-3.x creates a XExposeEvent for the unmapped FbTk::Menu(), which is not configured completely yet (hence unmapped). this causes a call to FbTk::Menu::clearItem() which then uses a value of 0 for m_rows_per_column to divide the current index which triggers a SIGFPE. it is still unclear, why nxserver-3.x creates the XExposeEvent for the unmapped (menu) window. doing nothing if the menu is unmapped 'fixes' the problem for now. many thanks to Lars Engels (bsd-geek.de) to assist me in debugging this issue.
2011-01-15removed useless include statementsMathias Gumz1-4/+0
'typeinfo' was needed for RTTI in isItemSelectable() (see last commit) 'algorithm' is already included some lines above
2011-01-15better use of API, no need for 'timeval' in MenuMathias Gumz1-4/+1
2011-01-15MenuItem::isEnabled() is sufficient to decide Menu::isItemSelectable()Mathias Gumz1-3/+1
MenuSeparator is never enabled since it returns always 'false' in its implementation of isEnabled(). no need to use RTTI imho.
2011-01-15small refactoring of FbTk/Menu codeMathias Gumz2-227/+252
* removed useless struct _menu * code deduplication via renderMenuPixmap() * improved documentation: - 'sublevel' actually means 'column' - 'persub' means 'row_per_column'
2010-09-20bugfix: ' floating point exception' due wrongly placed codeMathias Gumz1-1/+2
while integrating the old 'getSqrt()' function into the 'bsqrt()' function i misplaced some code. this lead to 'r' being 0 on the first run. doh.
2010-09-17bugfix: avoid naive use of 'putenv' by providing 'FbTk::App::setenv()'Mathias Gumz2-0/+60
to quote from 'man putenv': The string pointed to by string becomes part of the environment, so altering the string changes the environment. so, using putenv like { std::string foo("FOO=bar"); putenv(foo.c_str()); } is wrong and leads to a potentially corrupted environment. valgrind complaint correctly. FbTk::App seems to be the appropriate place to hold '::seten()' because it alters the environment of the application.
2010-09-17request explicitly as many elements for the gradient tables as we needMathias Gumz2-18/+8
the next step is to not use 'unsigned int' and then only store 'chars' in it, maybe even using RGBA data instead of separated arrays for r, g and b.
2010-09-17bugfix: forgot to resize 'pixels' before putting values into it (facepalm)Mathias Gumz1-2/+2
2010-09-17lots of code cleanup, reordering, trimming public API, bugfixesMathias Gumz4-896/+918
## FbTk/ImageControl.hh: * moved 'getSqrt()' over to TextureRender.cc because it is used only there * removed unused members m_root_window * use std::vector<> for colors and for the gradient buffers. ## FbTk/ImageControl.cc: * fixed memory leak in '~ImageControl', 'pixels' where not deleted[] at all. switched to std::vector, non-issue anymore. * moved identical code into functions 'allocateUnallocatedColors', 'initColortables' ## FbTk/TextureRenderer: * removed 'from', 'to', 'interlaced' from class, only used in 'renderGradient()' and are actually part of the given texture. * removed 'xtable', 'ytable' from class, only used in 'renderGradient()' * removed 'colors' from the class, is part of 'control' * moved render actions (invert, bevel1, bevel2, *gradient), they need more love but for now this is sufficient
2010-09-17use FbTk::API to reduce code duplicationMathias Gumz2-3/+25
2010-09-15code deduplication by using <algorithm> and FbTk/STLUtil.hhMathias Gumz3-53/+53
2010-09-14bugfix: 'reset' nr_shapes to '0' after last instance of 'Shape'Mathias Gumz1-1/+3
2010-09-14cleanup and code deduplicationMathias Gumz3-2/+3
* ClientPattern.cc: make compiler happy (complaints about XPROP not handled in switch) * FbTk/FbPixmap.cc FbTk/StringUtil.cc: signed vs unsigned * FbTk/FbString.cc: missing return * WinClient.cc: create atoms only once; use helper function * Window.cc: use a helper function
2010-09-14use one array instead of two to hold both 'names' and 'atoms' for the rootwindowMathias Gumz1-30/+29
2010-09-14bugfix: create the corner pixmaps only once per screenMathias Gumz1-14/+29
for each window (windows, menue etc) the initCorners() function of FbTk/Shape.cc was called (which is ok). On each call the corner pixmaps (of the Screen the window belongs to) were created and destroyed the formerly created pixmaps. this is not needed.
2010-09-14bugfix: free the shape-corners on the last used 'Shape'Mathias Gumz1-1/+1
the global 's_corners' vector was still used on an application shutdown (including ctrl-c SIGINT). depending on when 's_corners' was created on the stack this could lead to an exception ('pure virtual called') while trying to free the 'FbPixmaps' without having a valid 'FbTk::Application::instance()' left.
2010-09-10moved helper struct TextPropPtr into anonymous namespaceMathias Gumz1-0/+4
2010-09-09bugfix: initialize the Shape of a menu AFTER we created the window for the menuMathias Gumz1-1/+4
on startup a lot of 'Fluxbox: X Error: BadDrawable (invalid Pixmap ...)' occured. this was caused by using an empty 'Window' to create the shape.
2010-09-09added FbTk::Util::clamp() and simplified related codeMathias Gumz3-11/+48
2010-09-09simpler to use FbTk/Timer apiMathias Gumz2-0/+6
2010-09-08improved extract*Number functions from FbTk/StringUtil.ccMathias Gumz1-6/+22
2010-09-08cosmetic fix: looks like a copyNpaste issueMathias Gumz1-7/+0
2010-09-08code simplificationMathias Gumz3-18/+11
2010-09-08introduced FbTk::BidiStringMathias Gumz23-276/+284
a 'BidiString' holds both the logical content and the visual reordered version of the content of a string. this helps to reduce the number of calls to reorder the string before drawing it (as introduced in the patch from Ken Bloom) and to be more consistent in menus and textboxes (drawing cursors and underlining text).
2010-09-05avoid constructing new strings implicitMathias Gumz3-6/+6
2010-09-05cosmeticMathias Gumz1-2/+6
2010-09-05reuse temporary memory for reencoding / reordering fribidi-stringsMathias Gumz1-17/+25
2010-09-04added support for bidirectional textKen Bloom3-22/+69
2010-08-24code simplification / deduplicationMathias Gumz2-0/+30
* parse the string only once for a bunch of chars to check instead of starting over again and again from the beginning, created a helper function to do this (FbTk::StringUtil::findCharFromAlphabetAfterTrigger) * put same code into a function (setClockModeLabel()) * use much simpler code to switch between 12h and 24h mode and replace the fmt-switches
2010-07-14bugfix: another crash when cleaning up signalsJim Ramsay1-4/+4
While 769130f51a8f did fix one issue, it introduced another by changing the logic related to the new SignalTracker. The original logic (introduced in 9ad388c5bf16) was: -> in 'leave(Signal)', only call 'disconnect' -> in 'leaveAll()', call 'disconnect' and 'disconnectTracker' But 769130f51a8f inverted this, calling 'disconnectTracker' in both cases but only 'disconnect' in the 'leaveAll()' case, which would leave unattached signals around after calling 'leave(Signal)'. This fix not only repairs the logic, but renames the ambiguous 'disconnect' boolean to something more explicit: 'withTracker'.
2010-05-23bugfix: do not use invalid iterators while looping thru a container which ↵Mathias Gumz1-3/+2
gets destroyed
2010-05-23mostly cosmetic fixes, mainly discovered by 'clang --analyze'Mathias Gumz1-1/+1
reordering of Resource-related stuff was because of "error: explicit specialization of 'getString' after instantiation" complaints.
2010-05-16fixed potential memory leakMathias Gumz1-1/+3
2010-05-16cleanup created corner pixmaps, moved the initCorners() function out of the ↵Mathias Gumz2-23/+33
class
2010-05-16initialize all member variables, otherwise unclean state in some circumstancesMathias Gumz1-1/+6
(valgrind complained a lot about ::updateGeometry() accessing uninitialized variables)
2010-05-07bugfix: crash when cleaning up signalsMathias Gumz1-10/+9
22fa5f544b35 was not fixing anything, the real cause is that the SignalHolder still has a reference to a not existing Tracker.
2010-05-06compile fix: FD_ZERO (sys/select.h) on solaris wants to use memset(); closes ↵Mathias Gumz2-5/+10
#2997117
2010-05-06bugfix: added missing 'virtual' keyword, otherwise fluxbox crashes with ↵Mathias Gumz1-1/+1
'pure virtual method called'
2010-03-26Added Tracker interface for SignalHolder.Henrik Kinnunen1-3/+40
This is used by SignalTracker so Signals can disconnect from it when they die.
2010-03-26Minor fix for argument reference in MemFunSelectArgImplHenrik Kinnunen1-3/+3
2010-03-26Initialize all variables in FbWindowHenrik Kinnunen1-0/+4
2010-03-19Added SelectArg.hh to Makefile.amHenrik Kinnunen1-1/+1
2010-03-19Added SelectArg and MemFunSelectArg*Henrik Kinnunen3-0/+149
The MemFunSelectArg* functions can be used to select a specific argument from a signal. For example this would select the string argument as argument to the callback: Signal<void, int, float, string> signal; signal.connect(MemFunSelectArg2(obj, &Object::takesOneStringArg)); signal.emit(10, 3.14, "hello"); ... void Object::takesOneStringArg(const string& value) { ... }
2010-03-18Added missing RelaySignal.hh to Makefile.amHenrik Kinnunen1-1/+1
2010-03-18Added FbTk::relaySignal, which relays new signals to old Subject type signals.Henrik Kinnunen1-0/+62
2010-03-18minor cleaning in MemFun.hhHenrik Kinnunen1-6/+4