Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
the lag / skipping of the clock was not caused by faulty timer code
on fluxbox's side but by the behavior and inner workings of time().
since this is fixed now (913244789f) we can now rollback ec7fe513c8
and detect strftime-formats which need intervals of seconds or minutes.
minor: the small change to FbTk::Timer::setTimeout() reduces one
start() / stop() cycle for a running timer.
|
|
from time to time (...) time() might be off to gettimeofday() by a
second. the reason for this is that time() is usually implemented
by just returning the field 'second' of the struct that represents
the clock inside the kernel. gettimeofday() on the other hand also
takes the 'fraction' field (mostly 'nanoseconds') into account and
thus is closer to the current time than time().
the result of using time() was a perceived 'lag', sometimes the
clocktool even skipped a second. by using FbTk::FbTime()::system()
instead fixes the issue.
|
|
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.
|
|
It's hard to hit right moment to update the clock correctly: Either we are a
bit too early and the 'old time' is the same as the 'new time' and the clock
looks 'a bit off' or we are too late and the clock is 'a bit off'. This is
especially the case for format strings which do not show the second and thus
are updated only at the full minute (see bug #1082): if fluxbox does not
update the clock 'now' it would do it one minute later and thus the clock
might show the wrong time for roughly 1 minute.
Instead of coming up with something immensely clever we just trigger the
ClockTool every second. If no update of the shown time is needed fluxbox won't
do anything.
Some minor code reordering as byproduct.
|
|
Users expect time switches to happen upon system clock times. Calculating the
timeout for the next refresh of the shown time via the monotonic clock is
wrong: The monotonic clock yields values based upon some arbitrary point in
time which might be off a little bit to the system clock, a 'full' minute of
the monotonic clock might be in the midst of a system clock minute.
|
|
|
|
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.
|
|
|
|
I removed the const versions of reconfigSig() in the process since FbTk::Signal has no const
methods anyway.
|
|
WindowMenuAccessor returned strange alpha values if compiled
with 'g++ -Os'; unholy black magic happens if template<int> faces
functions returning only 'usigned char'.
|
|
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).
|
|
|
|
* 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
|
|
expressions'
|
|
in the clocktool
the idea (as a first patch) for this change was provided by
Thomas Habets (thomas at habets pp se). instead of having a
fixed interval each second, we now calculate the next point in
time based upon the format string used by the clocktool to render
the time. as long as no seconds are shown fluxbox now wakes up
once every minute.
|
|
|
|
ObjectRegistry
|
|
|
|
|
|
|
|
|
|
|
|
auto-register
|
|
|
|
|
|
Otherwise width of things in proportional fonts can be way out.
sf.net bug #1545066.
|
|
Fix something likely to break locales on BSDs and things without
nl_langinfo
|
|
console, plus handle catalogs better.
|
|
|
|
+ thanks Jonas Koelker
|
|
|
|
|
|
|
|
lowlatency dot de>
|
|
|
|
assume its 12:34:56.99, displaying 12:34:56 takes some time and so its already
12:34:57 when we display 12:34:56. to fix that i set the time to check the
clock to 0.01 seconds. that shouldnt hurt much since we only redraw the clock
when the string has changed.
a more complex approach would be to analyze the strftime-string and set the
timeout accordingly. but i dont know if its really worth the effort and beeing
a bit off schedule can happen too, just not as often as if you are in seconds
mode.
|
|
|
|
Some fixes could incidentally fix a few other bugs... the flaws were
pre-existing, I've just been weeding out a lot of duplication
|
|
background pixmap. Same for textbuttons.
|
|
|
|
causes a reconfigure .. which causes a loop over all toolbaritems and call
updateSizing() .. where we should check, if a new timeformat makes the clock
bigger or smaller...
closes #1026096
|
|
|
|
|
|
(Thanks Christian Storm)
- also a tiny cleanup of weird nls set
|
|
for consistency with transparency resources
|
|
|
|
|
|
|
|
|