Commit graph

5730 commits

Author SHA1 Message Date
Mathias Gumz
24f6f18127 updated ChangeLog 2011-02-03 19:19:35 +01:00
Peter Hercek
fc192b1161 allow to override 'FocusNewWindow' via .fluxbox/apps 2011-02-03 18:51:10 +01:00
Peter Hercek
5f6694ca14 bug fix: semantic differences between WinState::Decoration and Remember::save() 2011-02-03 08:43:47 +01:00
Mathias Gumz
83f8f59569 build fix: revert e38994ae72
'xft-config' is deprecated (http://lists.freedesktop.org/archives/xorg-devel/2010-March/006750.html)
and does not exist anymore on 'bleeding edge' versions (gentoo). 'pkg-config'
is the new way of doing things. 'pkg-config --libs xft' does only report
the libs needed and the linker finds out other dependencies on its own. currently,
'pkg-config' (version 0.25) reports only '-lXft'.

if the user wants for example LDFLAGS="-fuse-ld=gold --no-add-needed" then
all the needed libs must be produced, otherwise linkage fails. at the moment
it seems that fluxbox calls 'XftMatrixRotate()' and 'XftPatternAddMatrix()'
which both seems to trigger the need for 'fontconfig':

   undefined reference to 'FcMatrixRotate'
   undefined reference to 'FcPatternAddMatrix'

is 'pkg-config --libs xft' reporting to few libs? in comparison to
'xft-config --libs' for sure. bug? feature? i am not sure. there are
several ways to address this issue:

* append the needed libs manually via LIBS or LDFLAGS

  env LIBS="-lfontconfig" ./configure

* change build-system of fluxbox to do something like

   pkg-config --print-requires-private 'xft' 2> /dev/null || echo xft)`

(pkg-config version < 0.2x does not have --print-requires-private, which
 then leads to not print out all libs needed, which would then require
 a fallback to xft-config since an older system anyways, evidence is
 old pkg-config)

* changing build-system of fluxbox to use something like:

  pkg-config --static --libs xft

(which reports really all libs, even more than actually needed, check out
  http://osdir.com/ml/debian-bugs-closed/2011-01/msg01112.html)

* fix 'pkg-config' (or the related xft.pc) to report '-lXft -lfontconfig'
(not our code, but preferable)

* use 'pkg-config --libs xft fontconfig' since we know that calling the
xft functions requires linking against 'fontconfig' as well:

  pkg-config --libs xft fontconfig

which is what we use to get rid of the build-errors
2011-01-25 12:23:24 +01:00
Mathias Gumz
dd6014102a fix missing ')' introduced by e38994ae, the rest is cosmetical 2011-01-24 10:13:52 +01:00
Mathias Gumz
ae3652ebba updated 3rd/vim/fluxkeys.vim 2011-01-24 09:47:33 +01:00
Mathias Gumz
301a5bcd3e added little helper to create vimballs 2011-01-24 09:47:16 +01:00
Mathias Gumz
f382204759 added 'ArrangeWindowsHorizontal' 'ArrangeWindowsVertical' to 3rd/vim/syntax/fluxkeys.vim 2011-01-24 06:41:27 +01:00
Mathias Gumz
bb94b3e95d updated the AUTHOR file 2011-01-23 22:23:13 +01:00
Mathias Gumz
8662da1790 added 3rd/ party stuff, vim related files for now 2011-01-23 22:22:44 +01:00
Mathias Gumz
e38994ae72 build fix: use 'xft-config' instead of 'pkg-config' to use the right libs
when linking with binutils-gold and --no-add-needed it is not enough to
just use -lXft but it must be -lXft -fontconfig (and some more). since we
use 'pkg-config --libs' to find out about the needed flags and 'pkg-config'
only returns -lXft (except by using

   pkg-config --libs `pkg-config --print-requires-private xft`

) we switched to 'xft-config --libs' which gives us the complete list of
all needed libs.

the issue was brought to attention by

   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=554386

but the proposed fix was just quick and dirty.
2011-01-23 21:45:19 +01:00
Mathias Gumz
e868ff5928 bug fix: make fluxbox work under nxserver, closes #2813828
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-18 21:43:41 +01:00
Mathias Gumz
7f6d03e7bf compile fix, new name of setMinimumSublevels() is setMinimumColumns() 2011-01-16 08:27:25 +01:00
Mathias Gumz
cc2774871a removed useless include statements
'typeinfo' was needed for RTTI in isItemSelectable() (see last commit)
'algorithm' is already included some lines above
2011-01-15 21:49:37 +01:00
Mathias Gumz
1f0adef4da better use of API, no need for 'timeval' in Menu 2011-01-15 21:38:56 +01:00
Mathias Gumz
05a52116df MenuItem::isEnabled() is sufficient to decide Menu::isItemSelectable()
MenuSeparator is never enabled since it returns always 'false' in its
implementation of isEnabled(). no need to use RTTI imho.
2011-01-15 21:37:45 +01:00
Mathias Gumz
bb480030f5 small refactoring of FbTk/Menu code
* removed useless struct _menu
* code deduplication via renderMenuPixmap()
* improved documentation:
   - 'sublevel' actually means 'column'
   - 'persub' means 'row_per_column'
2011-01-15 21:31:37 +01:00
Mathias Gumz
accb8c3fa3 compile fix: missing symbol (SystemTray::getNetSystemTray()) when configured --disable-toolbar 2011-01-13 16:27:53 +01:00
Mathias Gumz
9e17a0d6d7 updated Changelog 2011-01-06 10:16:15 +01:00
Mathias Gumz
e8ce9ed3a3 bugfix: do not assume ':number.screen' as the result of 'DisplayString()'
a newer xlib recently changed the result of 'DisplayString()' a little bit:
instead of returning ':0.0' or ':1.0' it yields ':0' or ':1'. our code to
transform this string into something that includes the currently used
Screen worked only on something like ':0.0'.

we now find the '.' after the ':' and strip that part away.
2011-01-06 08:33:34 +01:00
Mathias Gumz
e2d52a3948 bugfix: std::string() does not like NULL on construction
not having DISPLAY set (eg: on a headless system) caused fluxbox to crash.
2010-10-13 15:48:29 +02:00
Mathias Gumz
650b6f842b use 'system()' to run 'fluxbox-update_configs'
by using FbCommands::ExecureCmd() we run 'fluxbox-update_configs' in
the bacground while booting a new fluxbox instance already. 'system()'
waits until 'fluxbox-update_configs' is done and then gives the control
back to fluxbox.
2010-09-21 00:08:16 +02:00
Mathias Gumz
78b09ee932 updated 'texturetest.cc' to work with current API 2010-09-21 00:05:15 +02:00
Mathias Gumz
ae7a54a4b6 bugfix: ' floating point exception' due wrongly placed code
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-21 00:04:46 +02:00
Mathias Gumz
b530c14051 upgrade default 'init' file to reflect current configVersion 2010-09-19 10:53:53 +02:00
Mathias Gumz
ac4e11fe09 updated ChangeLog 2010-09-19 10:53:15 +02:00
Mathias Gumz
375c93241d merged conflicts 2010-09-19 08:49:59 +02:00
Mathias Gumz
e0c440f599 pushed to early ... 2010-09-19 08:48:35 +02:00
Mathias Gumz
e3a2c56252 compile fix: use 'CallMemFunWithRefArg' instead of bind2nd(mem_fun(), *foo)
g++-4.1 does not like parts of 12e1ef7826,
calling std::bind2nd(std::mem_fun(func), ref_arg) lead to a bunch of

   error: forming reference to reference type 'XYZ'

in order to avoid switching either back to the old for-loops or boost::bind
or to enforce a newer compiler (eg, g++-4.4) to the users a new helper
functor was created: 'CallMemFunWithRefArg'

this commit also fixes a little copy and paste error introduced in
12e1ef782, 'AtomHandler::updateClientClose' was called instead of
'AtomHandler::updateWorkspace'.
2010-09-19 08:46:21 +02: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
9cf312fc9d recovered lost change from 041d586972
got lost in d3eabeb805 somehow
2010-09-18 09:26:05 +02:00
Mathias Gumz
87b45bd0d1 bugfix: avoid naive use of 'putenv' by providing 'FbTk::App::setenv()'
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-17 23:43:24 +02:00
Mathias Gumz
f3ad09c4ce missing initializations
'valgrind' reported a lot of code branches based upon uninitialized
variables. some are not identified yet.
2010-09-17 23:34:03 +02:00
Mathias Gumz
87cffef7f5 request explicitly as many elements for the gradient tables as we need
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-17 23:32:02 +02:00
Mathias Gumz
786eef6e39 bugfix: forgot to resize 'pixels' before putting values into it (facepalm) 2010-09-17 23:26:56 +02:00
John K Pate
f1f7bebf37 added 'ArrangeWindowsVertical' to actions 2010-09-17 16:22:33 +02:00
Mathias Gumz
d3eabeb805 moved commandline parsing to its own function 2010-09-17 15:51:16 +02:00
Mathias Gumz
e84c64f7be lots of code cleanup, reordering, trimming public API, bugfixes
## 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-17 15:34:12 +02:00
Mathias Gumz
603b36a2cc use FbTk::API to reduce code duplication 2010-09-17 14:46:01 +02:00
Mathias Gumz
041d586972 code simplification by reducing if-else hell
a lot of the parsing-related and menu-building stuff is just plain
stupid boiler plate code. putting the data into a const array
separates the boiler plate data from the actual code.
2010-09-17 14:44:58 +02:00
Mathias Gumz
0b1f160830 use hardcoded array for hardcoded placement menu defaults 2010-09-15 13:01:46 +02:00
Mathias Gumz
61bf564718 removed useless code
'tools' is transformed to lower case some lines above,
'm_tools_ is a copy of the lower cased 'tools'.
2010-09-15 12:44:14 +02:00
Mathias Gumz
0beda162d4 code deduplication by using <algorithm> and FbTk/STLUtil.hh 2010-09-15 12:43:30 +02:00
Mathias Gumz
12e1ef7826 code deduplication by using <algorithm> and FbTk/STLUtil.hh 2010-09-15 02:07:09 +02:00
Mathias Gumz
ba316aa18a code cleanup, missing commit for 2b62cf9733 2010-09-15 01:27:27 +02:00
Mathias Gumz
52f614b598 bugfix: 'reset' nr_shapes to '0' after last instance of 'Shape' 2010-09-15 01:23:56 +02:00
Mathias Gumz
2b62cf9733 cleanup and code deduplication
* 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-15 01:22:01 +02:00
Mathias Gumz
c6047e9eba use one array instead of two to hold both 'names' and 'atoms' for the rootwindow 2010-09-14 16:59:05 +02:00
Mathias Gumz
f39bcbd93c bugfix: create the corner pixmaps only once per screen
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-14 16:58:08 +02:00