Commit graph

5905 commits

Author SHA1 Message Date
Mathias Gumz
0820bcb640 Fix build-system: use xxx_LDADD instead of xxx_LDFLAGS
xxx_LDFLAGS place the libraries like '-lX11' or '-lXft' at the beginning of
the linker command. Some systems were not able to handle the situation and
this lead to a lot of unresolved symbols. Reading the documentation of
automake:

    ... you can use LDADD to do so. This variable is used to specify
    additional objects or libraries to link with; it is inappropriate for
    specifying specific linker flags, you should use AM_LDFLAGS for this
    purpose.

In addition we link against -lm in order to satisfy symbols refering to 'cos'
and 'sin'.
2015-01-04 16:21:02 +01:00
Nable 80
ad968e32b3 Fix to make clang happy
POSIX states that 'd_name' in 'struct dirent' is char[], so it cannot be NULL.
This will result in the compiler complainting about an expression which always
evaluates to true ... for this compiler (clang). But in some implementations
'd_name' is a 'char*' that's why it's better to keep the check for possible
NULL.
2015-01-03 21:47:51 +01:00
Mathias Gumz
90f2fcf031 Minor API change for OSDWindow
OSDWindow::resize(const FbTk::BiDiString&) shadowed FbWindow::resize(x, y). To
fix this I renamed the function to OSDWindow::resizeForText() to make the
intention clear.
2015-01-03 21:45:14 +01:00
Mathias Gumz
3c85ace912 Fix signature ITypeAheadable::isEnabled() 2015-01-03 21:44:31 +01:00
Mathias Gumz
ccd86cfe9c Fix signature FbTk::FontImp::rotate() 2015-01-03 21:43:51 +01:00
Mathias Gumz
63f9a1637f Clean unused variables 2015-01-03 21:42:24 +01:00
Mathias Gumz
60e97b968b Fix clang warning 'expression with side effects' 2015-01-03 21:36:35 +01:00
Mathias Gumz
fb7bc7380d Fix number2*() functions
As correctly pointed out by 'Nable80': "%llx" does not create the 0x prefix
for the hex-string. In addition to that: snprintf() adds a terminating \0.
2015-01-03 21:33:20 +01:00
Mathias Gumz
6a9c14e620 Update ChangeLog 2015-01-03 18:52:55 +01:00
Mathias Gumz
6fe7fbdc6b Remove dead / unused code
Again: Compiler happy, we are happy.
2015-01-03 18:50:20 +01:00
Mathias Gumz
65e0654249 Fix typo / editor bug or something like that.
While running code analysis tools this issue popped up. As it is written it is
clearly a NOP, but the reason for why it is written that way remains unknown.
I suspect that it was a textfragment introduced by some repeat-function of the
used editor (think '.' in VIM). The code was introduced by commit a932a7a801
and looked like this in the original form:

   if(!XQueryTree(FbTk::App::instance()->display(), window().window(),
                  &root_return, &parent_return,
                  &children_return, &nchildren_return))
       parent_return=parent_return;//return;

Look at the outcommented return statement. I decided to return from that
function instead of the NOP.
2015-01-03 18:45:28 +01:00
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
11974fa40a Update copyright info 2015-01-03 18:40:55 +01:00
Mathias Gumz
74df62b081 Remove unused code / option from FbRun 2015-01-03 18:39:46 +01:00
Mathias Gumz
3e76d43987 Use correct buffer size for number2*() 2015-01-03 18:39:09 +01:00
Mathias Gumz
362b5c191a Identify clang compiler 2015-01-03 17:52:15 +01:00
Mathias Gumz
1a5d52481c Preparation of release 1.3.6 2015-01-03 15:43:33 +01:00
Mathias Gumz
4952718536 Fix build issue 2015-01-03 14:40:56 +01:00
Mathias Gumz
a8dfb56739 Remove reference to src/tests/testSignal 2015-01-03 14:39:59 +01:00
Mathias Gumz
f5934de61d Recreate man-pages 2015-01-03 14:07:51 +01:00
Mathias Gumz
376ed523cb Update release version 2015-01-03 14:07:34 +01:00
Mathias Gumz
354e59f547 Fix build issue with out-of-src-builds 2015-01-03 14:06:10 +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
2309751143 make use of FbTk-api 2014-10-27 13:46:32 +01:00
Mathias Gumz
c5fd69cc9d treat windows having WM_CLASS == "DockApp" like DockApps
this commit implements feature-request #317: "Add support for GTK dockapps.":

"Back in 2010, WindowMaker implemented a system where windows with WM_CLASS
res_class = DockApp would be treated as if they had initial_state =
WithdrawnState, since GTK refuses to allow this."
2014-09-29 09:26:52 +02:00
Arkadiusz Bokowy
ed7bcc5dbc Corrections for border width for relative resize 2014-09-29 09:06:03 +02:00
Arkadiusz Bokowy
786d8bacc0 Code cleanup
File name expansion is done internally by the Slit::loadClientList, so there
is no need to duplicate the code.
2014-09-14 19:09:11 +02:00
Mathias Gumz
f0a178f515 fix: check the correct XClassHint property
kudos to Arkadiusz Bokowy (this commit is a slightly changed version
of a patch sent to the devel-ml): when retrieving the '.res_name' of
a XClassHint we should check '.res_name' and not '.res_class'.

the other changes only reduce the code.
2014-09-14 17:52:29 +02:00
Mathias Gumz
026343b6b1 fix uninitialized variables 2014-07-22 22:25:47 +02:00
Mathias Gumz
5f45524211 fix _NET_MOVERESIZE_WINDOW resize issue (#1108)
handing over the dimensions of a WinClient client must not contain properties
of the FbWinFrame, otherwise they get added twice in
FbWinFrame::moveResizeForClient() and thus result in a resizes when no resize
is wanted.

other changes: it's easier for me to detect the nth bit when the value looks
like (1 << 8) instead of 0x0100 (for the 8th bit). that is why i changed
0x0100, 0x0200 etc. in the nearby code.
2014-07-22 22:03:33 +02:00
Mathias Gumz
f3e82cae83 allow a timeout of a full 'unit'
the -1 in the FbTk::FbTimer::remainingNext() function was pointless in the
first place anyway: reducing the timeout by just 1 microsecond improves
nothing (in this case). if the timer triggers exactly at a full unit (second)
then it's correct to wait for the full next unit.
2014-05-12 12:28:31 +02:00
Mathias Gumz
6700eb354f cosmetic, less code 2014-05-12 12:27:46 +02:00
Mathias Gumz
948e63eb60 detect minute-based strftime-formats (again)
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.
2014-05-12 12:17:00 +02:00
Mathias Gumz
913244789f fix clocktool lagging behind and skipping seconds
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.
2014-05-12 10:22:49 +02:00
Mathias Gumz
9b40943dea removed reference to 'defaults.hh' 2014-04-11 17:58:28 +02:00
Mathias Gumz
e105de7d46 merge Sami Kerola's new build-system 2014-04-11 17:42:40 +02:00
Mathias Gumz
bc272ba4ae use function fluxbox::findScreen() 2014-04-09 22:44:05 +02:00
Mathias Gumz
617635f8eb fix excessive loading of keys file caused by xmodmap
xmodmap (and other tools) trigger MappingNotify events. a single xmodmap
expression such as "keycode comma = comma semicolon" might trigger 4 or 5
MappingNotify events. loading the keys file on each of them is quite
unefficient.

fluxbox now uses a (250ms) timer which is reset upon further events.
2014-04-09 22:40:13 +02:00
Mathias Gumz
121bd23862 move shared build instructions for nls into a common file 2014-02-19 18:13:27 +01:00
Amadeusz Sławiński
559947186e make sure that result of division is signed int
there is problem that x/y ended with unsigned int value due to
width()/height() and negative result of division ended up being big
it causes Focus to move window due to screen boundary checks

fixes annoying behaviour of window moving few pixels with
Mod4 KP_8 :MacroCmd {ResizeTo 100% 50%} {MoveTo 0 0 Top} {Raise} {Focus}
2014-02-19 17:41:15 +01:00
Peter Pentchev
58472fea6d Fix the Bulgarian translation's codeset.
The codeset of the Bulgarian translation was incorrectly specified as
ISO-8859-1 instead of CP1251.  This led to incorrect transcoding to
UTF-8 and the display of wrong characters in the Fluxbox menu.
2014-02-19 17:31:00 +01:00
Mathias Gumz
43bdf499d5 Fix race condition on shutdown
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*
2014-02-18 19:34:35 +01:00
Mathias Gumz
3696562aa8 update of copyright info 2014-02-17 20:14:49 +01:00
Mathias Gumz
ff3635ad0a Fix ArrangeWindowsStack* for multi-head displays
* Fix integer wrap around for some situations (resulting in a very wide
  window):

      w = max_width - x_offs - (*closest)->widthOffset()

  If the given window is on the right most display and thus 'x_offs' is
  bigger than 'max_width' (half of the display width), the resulting 'w' wraps
  around and becomes very large.

* Place a single window via ArrangeWindowsStack* as well
* Some minor code styling / reordering along the way
2013-08-02 11:19:26 +02:00
John Sennesael
57ec44e994 Add support for stacked tiling via ArrangeWindows* 2013-08-02 08:56:07 +02:00
Ed Martin
58e09b7190 Fix lost keypresses after workspace change (#1067)
Do not Ungrab the keyboard for a KeyPress event, this causes us to lose the
KeyRelease event which is needed to ungrab the keyboard after the event
happened.
2013-08-02 08:46:45 +02:00
Isratine Citizen
3ad6e299f6 update hebrew translation 2013-08-02 08:41:57 +02:00
Takeshi Hamasaki
99a8ebbf6f Updated Japanese Translation 2013-08-02 08:40:28 +02:00
Raphael Kubo da Costa
0084149c3d Constify the type passed to std::equal_to.
std::bind2nd() has problems with the existing call because it uses the
argument type passed to std::equal_to() in std::binder2nd()'s constructor,
but WinClient* does not have the const specifier that `client' does.

The call works fine with libstdc++ because of the way it implements
std::bind2nd(), but fails with libc++ and possibly with other STL
implementations as well.
2013-07-03 14:29:39 +02:00