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
While 769130f51a did fix one issue, it introduced another by changing the
logic related to the new SignalTracker. The original logic (introduced in
9ad388c5bf) was:
-> in 'leave(Signal)', only call 'disconnect'
-> in 'leaveAll()', call 'disconnect' and 'disconnectTracker'
But 769130f51a 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'.
As noted in the previous commit, StrictMouseFocus now works as advertised:
Focus follows mouse on every EnterNotify event (except when the "ClientMenu"
closes or during alt+tab window cycling)
This is not actually implemented yet, but from now on, "MouseFocus" means:
Focus follows mouse only when you are moving the mouse, any EnterNotify events
caused by non-mouse operations (window closing, keycommands, changing
desktops) will *not* shift focus
And once fully-implemented, "StrictMouseFocus" will mean:
Focus follows mouse on every EnterNotify event (except when the "ClientMenu"
closes or during alt+tab window cycling)
the old way of deciding which head to (re)maximize the current window
was to just test if the center of the window is INSIDE which head.
now we calculate the closest head which fixes the problem