Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
This commit fixes primarily a race condition that occurs when xinit(1) shuts
down: by not acting properly fluxbox gets caught in an infinite loop. It
caused bug #1100.
xinit(1) sends a SIGHUP signal to all processes. fluxbox tries to shutdown
itself properly by shutting down workspaces and screens. While doing that, the
Xserver might be gone already. Additionally, fluxbox used to restart() itself
on SIGHUP, which is clearly not the right thing to do when xinit(1) is about
to end the session.
So, fluxbox does this:
* handling SIGHUP now shuts down fluxbox without clearing workspaces and
screens.
* A 2 second alarm() is triggered in Fluxbox::shutdown() as a last resort
* XSetIOErrorHandler() is used to recognize the disconnect from the xserver.
* SIGUSR1 is for restarting fluxbox, SIGUSR2 for reloading the config
* FbTk/SignalHandler.cc/hh is gone; this unused abstraction served currently
no real purpose. Signal handling is now done in main.cc
* Unrelated to the issue itself src/main.cc was trimmed down quite a bit and
the code (responsible for handling the command line interface) was moved to
src/cli*
|
|
usually $HOME is set when fluxbox runs. in some rare scenarios (eg., fuzzying
binaries to detect bugs) one could launch fluxbox by using 'env -i' and thus
eliminating $HOME from the environment. to prevent crashes fluxbox uses now
'getpwuid()' when $HOME is not set to detect the home folder.
|
|
This rather large change will attempts to make 'make' to work better.
See excellent paper 'Recursive Make Considered Harmful' by Peter Miller
for further explanation why several make files is worse than one for
whole project.
Note. The tests are build with 'make check' rather than defining TEST.
Reference: http://miller.emu.id.au/pmiller/books/rmch/
Reference: http://karelzak.blogspot.co.uk/2013/02/non-recursive-automake.html
|
|
This commit alters XRANDR (X Resize And Rotate) extension dependency,
which is expected to have at least version 1.4. Earlier old versions of
xrandr were supported, at least to some extent.
|
|
The earlier _GNU_SOURCE definitions possibly did not take effect
everywhere where it was intended.
|
|
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.
|
|
The INCLUDES macro deprecated in favour of AM_CPPFLAGS.
References: http://www.gnu.org/software/automake/manual/html_node/Program-Variables.html
|
|
* much more readable and easier to read code
* smaller code
* reduced binary size due to removed big lookup-table for square root
* simple 'optimizations (lookup tables, packing of data), nothing too fancy
|
|
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
|
|
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.
|
|
|
|
Found using cppcheck.
|
|
|
|
- merged all the common stuff from 0,1,2,3 argument versions into one common base class
- removed ReturnType template parameter as it was instantiated with "void" everywhere and the
current ignores the return value of the callbacks anyway
|
|
|
|
|
|
|
|
|
|
the rest of fluxbox
|
|
|
|
|
|
|
|
|
|
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) {
...
}
|
|
|
|
|
|
For example connecting a function that takes two arguments
to a signal that emits three arguments:
struct Functor {
void show(int a, int b);
};
Functor f;
Signal<void, int, int, int> s3;
s3.connect(MemFunIgnoreArgs(f, &Functor::show));
|
|
This is suppose to replace the obsolete Subject/Observer classes.
See the src/tests/testSignals.cc for basic usage.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
use utf8 internally
|
|
|
|
|
|
|
|
- Removed "antialias"-option completly, to enable/disable "antialias"
use either <fontname>:antialias=<bool> in the style or use
Xft.antialias: <bool> in your .Xdefaults
- Added new styleresources:
*.font.effect: <halo|shadow>
*.font.shadow.x : <int> - shadow x offset
*.font.shadow.y : <int> - shadow y offset
*.font.shadow.color : <color> - color of shadow
*.font.halo.color : <color> - color of halo
- Removed 'shadow' and 'halo' options from fontdefinitions:
!! Style authors have to update their styles !!
- Simplified XmbFontImp to not try all possible fonts to match locale
- Style authors may specify multiple fonts:
<font1>|<font2>|<font3>
if loading of font1 fails, fluxbox probes <font2>, etc. The last font is
"fixed". Hints for style authors:
- if xft tries to load a font it will _ALWAYS_ return a valid font,
it doesnt have to look like the one you want to have, read more
about it: http://fontconfig.org/fontconfig-user.html
- export XFT_DEBUG=1 before running fluxbox helps to see
which fonts are picked.
eg:
*.font: Verdana,Arial-12:antialias=true|-artwiz-snap-*-
if fluxbox is compiled with xft this will NEVER try to
load "-artwiz-snap-*-" since xft gives for sure a font,
most likely Verdana or Arial but noone knows. So, if
fluxbox has no xft support the first fontpattern fails
and fluxbox tries the next one, which might be successful.
if everything fails, it will use "fixed"
- Added caching of fonts, fonts are only loaded once.
- Fixed #1090902 (slow utf8 start)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|