Commit graph

404 commits

Author SHA1 Message Date
Mathias Gumz
bd519dd952 Remove various unused variables
Clang and Gcc-4.9 complaint about some unused variables here
and there. And who are we to not make a compiler happy :)
2015-01-03 18:43:44 +01:00
Mathias Gumz
74df62b081 Remove unused code / option from FbRun 2015-01-03 18:39:46 +01:00
Mathias Gumz
376ed523cb Update release version 2015-01-03 14:07:34 +01:00
Mathias Gumz
a3c0b049bf Fix corruption of fbrun-history
This commit fixes issues #72 (brought up + different solution by Mattias
Guns; I received a similar patch by 'Nable 80' via ML and discussed the
issue in #fluxbox with 'Nable 80'), patch #73 (Mattias Guns) and finally
patch #162 (Ulrich Eckhardt; this commit is heavily based upon Ulrich's
work).

The original code was overly complex. It tried to avoid writing
bytes to the disk at the expense of comprehensibility and as a result it
was buggy. I looked at both patches from Mattias and 'Nable 80' which address
the bug with skipping entries in the history-file (my fault: incorrect use
of outfile.ignore(1, '\n')): They provided a proper fix for the problem
but I decided to use Ulrich's code since it improves the whole code by making
it a lot simpler.

So, kudos to all of you.
2015-01-02 17:08:44 +01:00
Mathias Gumz
0e8a27e931 Fix loading fbrun-history
Previous code add one additional entry on loading the history. This
commit is one part of the patch #162 (see [1] and [2]), written
by Ulrich Eckhardt <doomster@knuut.de>.

[1]: https://sourceforge.net/p/fluxbox/patches/162/
[2]: https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=10;filename=fbrun-bug636632.patch;att=1;bug=636632
2015-01-02 16:45:39 +01:00
Mathias Gumz
e105de7d46 merge Sami Kerola's new build-system 2014-04-11 17:42:40 +02:00
Mathias Gumz
3696562aa8 update of copyright info 2014-02-17 20:14:49 +01:00
Mathias Gumz
f464f24eb3 fix detection of $HOME folder
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.
2013-06-29 08:39:02 +02:00
Paul Tagliamonte
34656ac622 Returning EXIT_FAILURE on exit in fluxbox-remote. 2013-06-18 18:02:38 +02:00
Sami Kerola
7541054b29 build-sys: move to non-recursive build
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
2013-05-26 10:38:11 +01:00
Sami Kerola
9e5eddfc3d build-sys: use pkg-config to locate dependencies
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.
2013-05-26 10:38:10 +01:00
Sami Kerola
47b9786533 build-sys: use AC_USE_SYSTEM_EXTENSIONS
The earlier _GNU_SOURCE definitions possibly did not take effect
everywhere where it was intended.
2013-05-26 10:38:10 +01:00
Sami Kerola
73b7958770 build-sys: include config.h to all files using automake
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.
2013-05-26 10:38:10 +01:00
Mathias Gumz
ac27c8cb42 Updates copyright date information in some binaries 2013-02-14 19:45:17 +01:00
Mathias Gumz
dc47491533 Adds 'ClientPatternTest' command
ClientPatterns might be tricky to get right. Instead of fiddling around in
either the keys-file or the apps-file and restarting fluxbox to see if the
changes had any effect / matched the right windows, 'ClientPatternTest' and
the fluxbox-remote should make this easier:

    $> fluxbox-remote "clientpatterntest (title=.*vim*)"

This causes fluxbox to store the list of matched windows in the
_FLUXBOX_ACTION_RESULT property onto the rootwindow. This property might
then be read by:

    $> xprop -root _FLUXBOX_ACTION_RESULT

or

    $> fluxbox-remote result

The format of the list is:

    win_id \t title_of_window \n

win_id is '-1' when fluxbox wasn't able to parse the given ClientPattern.
win_id is '0' when there are no windows matching the given ClientPattern.
2013-01-31 09:14:06 +01:00
Sami Kerola
f12e149baf automake: use AM_CPPFLAGS rather than INCLUDES
The INCLUDES macro deprecated in favour of AM_CPPFLAGS.

References: http://www.gnu.org/software/automake/manual/html_node/Program-Variables.html
2013-01-03 08:17:27 +01:00
Sami Kerola
be2c52a146 util/fluxbox-generate_menu: default browswer variable can be empty
Noticed when debugging in mac.
2013-01-02 10:08:04 +01:00
Sami Kerola
dcdfdfd56b utils: remove bashisms
fbsetbg: The random number generation used 'time' shell internal, which
does not exist in all shells.  Allowing 'ps' output to be part of cksum
input will increase entropy and enhance quality of the randomness.

fbsetbg: The second fix is more important.  In posix shell there is no
'==' comparision operator.

fluxbox-generate_menu: There are no quarantees about echo accepting
options, so use 'printf' for more advanced outputing.
2013-01-02 10:01:00 +01:00
Vladimir A. Pavlov
7a404e7fbc Store XClassHint on stack, not in dynamic memory 2012-12-30 12:27:37 +01:00
Ryan Pavlik
d70bdbe675 Check .empty() instead of .size() == 0
Found with cppcheck.
2012-01-04 07:54:46 +01:00
Ryan Pavlik
f859e78cb2 Exceptions should be caught by reference.
Found using cppcheck.
2012-01-04 07:51:35 +01:00
Ryan Pavlik
f77f5d461b util/Makefile.am,fluxbox-generate_menu.in: use EXEEXT
Needed to allow mingw-cross-env cross build
2011-10-31 10:54:09 -05:00
Ryan Pavlik
5cb7326d22 fluxbox-update_configs.cc: Fix on windows - no kill or sigusr2 2011-10-31 10:54:09 -05:00
Ryan Pavlik
3ca61475fb FbRun.cc: Fix on windows where there is no fork 2011-10-31 10:54:09 -05:00
Mathias Gumz
8dd11efc76 cosmetics 2011-10-21 08:34:53 +02:00
Mathias Gumz
4f4d5e25d9 bugfix: fbsetroot needs to use 24bit visuals as well
12f44680df introduced ARGB visuals. if fluxbox
creates 32bit visuals for the container window or the root window: does not work.
2011-10-21 08:34:37 +02:00
nacitar sevaht
2f166eb4ae fluxbox-remote now properly returns exit status
The previous check relied upon the (undocumented) return value of
XChangeProperty to determine the exit status; at least, on my gentoo system,
the function seems to return 1 even when it fails to change the property
due to contrived, and invalid, parameters.  However, setting an error
handler allows proper detection of this case.  So, now the return status
properly indicates whether or not the property was changed (but not
whether fluxbox liked the command!).
2011-05-08 07:47:02 +02:00
Pavel Labath
127ec08ae6 Fix "comparison between signed and unsigned" warning 2011-05-04 20:33:07 +02:00
Pavel Labath
86c9b100f3 Fix VPATH builds 2011-04-18 08:50:44 +02:00
skizzhg
fbf5ce8b30 Changed fbsetbg's tips to the new behaviour. 2011-04-11 17:46:26 +02:00
slakmagik
906166f42d make XMESSAGE a variable and use it consistently
Previously, gxmessage was getting substituted in one place and not
another.
2011-03-29 08:44:51 +02:00
slakmagik
a8583b79ae avoid trailing spaces between app and closing }
Add a few lines of code to prevent a few spaces in some menu output.
'{$app $options}' would expand to '{app }' if no options were set.

Also, while scattered throughout, in this particular spot the
unnecessary braces around some of the variables (and not around some
others) and inside flux's braces could be very visually confusing and
lead to editing errors, so removed those.
2011-03-29 08:44:51 +02:00
slakmagik
0fbb2cb73c separate functions and main code
Transpose one function from main to the rest of the functions and one
block from the top of the script to the top of main. Add an 'End
functions' comment.
2011-03-29 08:44:51 +02:00
slakmagik
2034e5ef44 add the configuration file equivalent of '-in' 2011-03-29 08:44:51 +02:00
slakmagik
e312f35d1a silence cmp
cmp's '-s' flag is POSIX - if it's as portable as that's supposed to
mean, that might be used instead.
2011-03-29 08:44:51 +02:00
Jeremiah Mahler
14a8a2b440 fbsetbg: improved aspect-ratio-filling for feh (thanks Jeremiah Mahler <jmmahler at gmail com>
Closes http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=583704
2011-02-21 20:16:00 +01:00
Mathias Gumz
0ef76292c5 changed the way we create the '~/.fluxbox' directory to avoid race conditions
before bringing up the first instance of Fluxbox we prepare the directory
and the files it needs. if the config version of exiting files is lower
than what we expect, we upgrade the config files. after that we bring
up Fluxbox.

the old way was problematic because setupConfigFiles() calls
'fluxbox-update_configs' which does its job in the background while
fluxbox continues to boot. 'fluxbox-update_configs' sends a USR2 signal
to the booting fluxbox (it might even be finished, no one knows) which
triggers 'load_rc()' which triggered 'setupConfigFiles()' again which
might trigger 'fluxbox-update_configs' again (on my machine
'fluxbox-update_configs' was called 3 times and left a pretty crippled
'keys' file when it was done).

bootstrapping before bringing up fluxbox resolves the issue. as a bonus:
no need to send USR2 to fluxbox to reload the config file because fluxbox
has not even tried to read it yet.
2010-09-18 17:51:30 +02:00
Mathias Gumz
c9c741c88d cosmetic 2010-09-18 17:27:28 +02:00
Mathias Gumz
24e4e98dbe updated config version to '13' and adjusted 'fluxbox-update_configs' accordingly
our users should migrate seamlessly to our new windows-cycling behaviour
without losing their current way of doing things. so, 'fluxbox-update_configs'
tries its best to add '(workspace=[current])' wherever it looks like a valid
place for it. such changed lines are marked by '!! FBCV13' at the end and can
be easily spotted in case the updater got it wrong.

addtional changes:

* added '-check' to 'fluxbox-update_configs' to check the version number in
  '~/.fluxbox/init' vs. the version number of 'fluxbox-update_configs'

* moved the update-code for each version into its own function, easier
  housekeeping
2010-09-11 22:04:15 +02:00
Mathias Gumz
690d926ac4 introduced FbTk::BidiString
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-08 20:17:21 +02:00
Mathias Gumz
1e9dafdc67 fixed the default 'OnTitlebar Mouse1' actions 2010-09-04 14:41:11 +02:00
Mathias Gumz
bc2b21547b implemented 'ActivateTab' action to (re)allow activation of tabs via mouse 2010-08-20 19:01:25 +02:00
Mathias Gumz
e05230ea4b deploy new key-bindings to old keys-files via fluxbox-update_configs 2010-05-05 08:41:48 +02:00
Mathias Gumz
7a86dad21b bugfix: do not create the temporary menufile 'somewhere' in the filesystem but next to the final one 2010-02-28 20:16:46 +01:00
Mathias Gumz
80e8cd071e just use the FbTk API 2009-10-02 08:38:24 +02:00
Mathias Gumz
1b4596ee85 bugfix: stop wiping out ~/.fluxbox/keys 2009-10-02 08:37:44 +02:00
Mathias Gumz
884db973bb cosmetic fixes: removed redundant ';' + some whitespaces 2009-09-30 21:02:24 +02:00
Mark Tiefenbruck
bb05494751 add a few items to fbgm 2009-06-28 12:57:42 -07:00
Jim Ramsay
ed28c69b8d Cleaned up 'fbsetbg -h' output
Reordered the "Options" section and made it more clear that for setting solid,
gradient, or pattern textures, one should also refer to fbsetroot(1).
2009-05-28 14:31:54 -04:00
Jim Ramsay
ae2d4b6b53 Don't complain on '-z' if there's no lastwallpaper
This hides the odd cornercase of users with no lastwallpaper file and no
background set in their style or overlay.

Adapted from the patch at
http://sourceforge.net/tracker/?func=detail&aid=2389567&group_id=35398&atid=413962
2009-05-26 16:36:43 -04:00