Commit graph

5850 commits

Author SHA1 Message Date
Mathias Gumz
3fa30a4c82 updated ChangeLog 2011-10-23 09:02:18 +02:00
Mathias Gumz
dc18666ef2 small code simplification 2011-10-23 09:01:19 +02:00
Mathias Gumz
ee34b376d7 Bugfix: clean up static resources correctly
93924af160 might corrupt memory with gcc-4.6.1 when
finishing fluxbox (clicking 'exit', sending it a SIGINT). Allthough the order, in which static / global
objects are initialized is undefined (at least between separate compilation units), the order in
which they are destroyed is well defined: in reverse order of initialization.

this means, that if 'ScreenImlibContextContainer contexts' (of ImageImlib2.cc)
gets initialized AFTER 'ImageImlib2 imlib2_loader' of Image.cc, it gets destroyed before
imlib2_loader. When that happens, ~ImageImlib2() works on a destroyed object.

(That lead to '* glibc detected * fluxbox: corrupted double-linked list: 0x0000000000dd2710 ***'
later on in 'iconv_close')
2011-10-23 00:01:45 +02:00
Mathias Gumz
3f76e117bf refactored MenuCreator
make public only what needs to be public
2011-10-21 08:42:48 +02: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
Gediminas Liktaras
12f44680df Added support for ARGB visual, patch #3284774
fluxbox now properly displays windows that require ARGB visuals when
an external compositor is running. This was done by creating the
container window with the correct visual and colormap when needed.

Closes #2874629
2011-10-20 09:41:55 +02:00
Mathias Gumz
b2b65dea7f fixed typo in startfluxbox manpage 2011-10-20 07:54:47 +02:00
Mathias Gumz
6601d9e50e updated ChangeLog 2011-10-17 17:08:27 +02:00
Mathias Gumz
a2558a2b14 removed obsolete handler for the gnome-window manager hints
nowadays every app should use the extended window manager hints exclusively.
2011-10-17 17:07:00 +02:00
Mathias Gumz
dc6c9c4e9b updated ChangeLog 2011-10-15 13:25:06 +02:00
Mathias Gumz
2ebb3e8808 ignore .build* directories 2011-10-15 11:26:57 +02:00
skizzhg
06c0d4845f updated it_IT translations 2011-10-15 11:25:08 +02:00
skizzhg
52e4dc32b7 cleaned up master translation file
Mark unused entries with '_OBSOLETE' to help other translators remove
unused entries from 'their' language.

Removed some pure technical translations meant for (copy and paste) error reporting
to developers or to the irc channel anyway. Since english is the common denominator
in bug reporting anyway, having the translated message to retranslate again is pointless.
2011-10-15 11:23:23 +02:00
Pavel Labath
0e1ee49603 Fix compilation with intel's compiler
the deleted function was never used, otherwise it would generate an error with other compilers as
well. icc noticed that it was nonsensical even when it wasn't used and complained.
2011-09-14 19:39:11 +02:00
Pavel Labath
755787c437 Documentation: fix default values of a couple more resources 2011-09-14 19:39:11 +02:00
Pavel Labath
bc667ced6a Documentation fix: default value of slit.placement resource was wrong 2011-09-14 19:39:11 +02:00
Pavel Labath
2d3c4b387d Documentation mentions nonexisting resource: session.numLayers
so I removed the obsolete line.
2011-09-14 19:39:11 +02:00
Pavel Labath
e54bca68d2 Make sure FocusableList disconnects from signals when it is destroyed 2011-09-14 19:39:11 +02:00
Pavel Labath
aa84c95253 Enable connecting to const Signals
The idea is that connecting to a signal doesn't change it's state or the state of the object
owning the signal (even though it needs to add the functor to the list for later reference).
Emitting, on the other hand, is usually done as a result of a state change and therefore remains
non-const.

Additional benefit of this arrangement is that objects can export const references to signals to
allow connecting, while keeping the ability to emit to themselves.
2011-09-14 19:39:11 +02:00
Pavel Labath
0a42e6ca3d Fix VPATH builds with --enable-nls
I needed to add explicit $(srcdir) in Makefiles when referencing to Translation.m.
I also removed generated-*.m files from the tree since they can be easily regenerated (and they
were confusing VPATH logic). They can be added to the distribution tarball later if needed (but
hopefully everyone has iconv).
2011-09-14 19:39:11 +02:00
Pavel Labath
3c050c3d99 Add explicit ReturnType cast to operator() of FbTk::Slots
without this it wasn't possible to construct a Slot returning void from functors returning some
real value because the compiler would complain about "return statement with a value in a function
returning void".

Theoretically, this may produce some unexpected type conversions, because static_cast is slightly
stronger than implicit cast, but I judge the risk to be negligable (the alternative would be to
provide explicit specializations for slots returning void - too much typing)
2011-09-14 19:39:11 +02:00
Pavel Labath
e67b9a6f83 Upgrade FbTk::Timer so it can take an arbitrary functor as a parameter 2011-09-14 19:39:11 +02:00
Pavel Labath
ae252c62cb Rename Signal::connect function taking an already-constructed slot to connectSlot
I do this to avoid compiler ambiguity between the two versions of connect()
2011-09-14 19:39:11 +02:00
Pavel Labath
05b5974e62 Add comparison operators to FbTk::RefCount
without them, gcc would compare them by converting them to bool first, which is not exactly what
one would expect. Frankly, I'm surprised it even worked without this.
2011-09-14 19:39:11 +02:00
Pavel Labath
536a16e6e2 Use RefCount to store keybindings
I'm doing this because I want to have access to keybindings from lua and for that I need more
flexible ownership semantics.
2011-09-14 19:39:11 +02:00
Pavel Labath
d21ceb4a23 Remove the assignment operator from a regular pointer to a RefCount
it is too easy too shoot yourself in the foot with it, other smart pointers also don't allow such
assignments. If you do want to assign to a RefCount pointer, use reset().
ps: assignment between two RefCounts remains possible, of course.
2011-09-14 19:39:11 +02:00
Pavel Labath
1f34dee9b3 Remove obsolete code
ps: it was already commented out, I'm just deleting it
2011-09-14 19:39:10 +02:00
Pavel Labath
2e75d238ab add FbTk::makeRef function, for easier construction of RefCount pointers 2011-09-14 19:39:10 +02:00
Pavel Labath
cfcc4d44aa FbTk::Timer accepts Slots instead of Commands as the former are more general 2011-09-14 19:39:10 +02:00
Pavel Labath
d338e6c003 Signal::connect now also accepts an already-constructed Slot
This way we can use Commands as signal handlers out-of-the-box.
2011-09-14 19:39:10 +02:00
Pavel Labath
bca20c5db4 Make FbTk::Command inherit from FbTk::Slot
Command offers a subset of functionality and could be completely removed at some point.
2011-09-14 19:39:10 +02:00
Pavel Labath
3ad611928a Fix a small bug in BScreen constructor
it was testing for FbWindow.property() == Success, where it should've tested for == true.
2011-09-14 19:39:10 +02:00
Pavel Labath
e4157821fc Add a reset() function to FbTk::RefCount
to make it's interface more compatible with other smart pointers.
2011-09-14 19:39:10 +02:00
Pavel Labath
0f85ade9be Mark FbTk::StringConvertor as NotCopyable 2011-09-14 19:39:10 +02:00
Pavel Labath
7bca844581 Prepare the Slot classes to be used independently of Signals
Added some polish around them and, to mark this special occasion, moved them out of the SigImpl
namespace.

PS: This partially reverts commit 0775350fee, since I had to
reintroduce ReturnType template parameter, because it will be used in other places. But Signal classes
remain without the ReturnType, because I still cannot imagine how would it be used.
2011-09-14 19:39:10 +02:00
Pavel Labath
0a40d1caf3 Add template copy constructor to FbTk::Refcount
and remove a an "almost" copy constructor (almost, because it takes a non-const reference
parameter) which was useless.
2011-09-14 19:39:10 +02:00
Peter Korsgaard
b9e9eb4e44 FbString: fix build without iconv
Commit 690d926 (introduced FbTk::BidiString) broke building without
HAVE_ICONV, because of wrong variable name and use of iconv_t type.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-09-11 17:18:30 +02:00
Mathias Gumz
f9df3ffeda sync the copied config files to disk before continuing
otherwise a race condition might appear between copying the default
config files to .fluxbox/ and executing 'fluxbox-update_configs'. under
macosx this lead to 'fluxbox hangs'.
2011-09-10 20:17:57 +02:00
Paul Tagliamonte
b104d9e4d0 Rebuilding the fluxbox docs to change fix a small grammer mistake
Fluxbox's man page had "allows to", which should actually be something like
 "allows one to".

 The rest of the .ins were rebuilt as a result. No changes otherwise.
2011-09-02 04:57:28 +02:00
Sven Michel
631fd58823 Re-licensing the ostrich theme due to issues regarding it's distribution
CC-BY-NC 3.0 is a great license, but it limits how well we can redistribute
 the theme it's self. This change allows distros (such as Debian) to keep this
 theme in the source.
2011-09-01 20:51:14 +02:00
Mathias Gumz
6c82cd5f84 bugfix: do not change workspaces when using NextWindow / PrevWindow buttons in toolbar 2011-09-01 17:08:50 +02:00
Mathias Gumz
0708d1e046 regrab ButtonMotionMask as well (needed for 'Move' events in keysfile) 2011-08-26 09:22:37 +02:00
Mathias Gumz
ec6df5c3d1 bugfix: remap keysyms to keycodes after 'MappingNotify', fix #3386257
setxkbmap and xmodmap both might change the keycodes. thus fluxbox needs
to remap the keysyms from the currently loaded keytree to new keycodes
after it received a 'MappingNotify' event.

we do not reload() the keys file because:

* the user might work on it right now
* remap only needed symbols is cheaper than parsing the keysfile anyway
2011-08-26 09:21:50 +02:00
Sven Michel
7b10649e28 Updated styles 'bloe' and 'arch' to look better without xpm-support 2011-08-11 09:58:19 +02:00
Mathias Gumz
1da473bab9 Use _NET_WM_ICON from 32bit apps (xfce4-terminal) correctly
The icons coming from _NET_WM_ICON are argb32. fluxbox uses such icons
in entities such as 'clientmenu', 'iconbar', 'titlebar'. These entities
are not related to the depth of the winclient but to fluxbox's default
depth. Using 'winclient.depth()' is a mistake, since fluxbox is unable
to copy pixmaps from 32bit to 24/16/15bit.

It is not necessary either, because fluxbox should extract the argb32 icon
data directly into the pixmap with the correct depth in the first place.

This fixes (reopened) bug #1852693.

Note: The whole icon code in fluxbox is quite messy, lots of copying and
scaling. It might be simpler and fater to just extract the icon when needed
, in just the size that is needed.
2011-08-11 09:48:08 +02:00
nacitar sevaht
822c02e96a TextDialog now handles parentrelative labels
Prior to this patch, TextDialog did not handle parentrelative labels;
borrowing code from OSDWindow, now TextDialog properly handles this.

Eventually, I plan to combine the good parts of TextDialog and OSDWindow
into OSDWindow, and then let TextDialog derive from OSDWindow... but for
now, here's the band-aid fix for the issue without the refactorization.
2011-05-16 22:09:57 +02:00
nacitar sevaht
fd6fbb80e7 TextDialog and ToolTipWindow style rendering bugs fixed
TextDialog windows (such as 'set title', or 'edit clock format') now
properly render their titlebar to match the current style.  Previously,
the titlebar font settings were controlled by window.font.*, and this
became apparent because window.font.effect needed to be set to put
'halo' on the titlebar of these TextDialogs.  However,
window.font.effect controls the effect on the text within the editbox on
these as well, having these set in the same location is far from
desirable.  Specifically because the TextDialog essentially emulates the
titlebar of other windows.  So, after this change, window.font.effect
still controls the text in the editbox, but the titlebar area is themed
as the titlebars of other windows.

Text justification of titlebar and border width, is now respected in
TextDialog.  Also, previously the edit box was sized in an odd way; one
which left part of the window actually undrawn (so you'd get artifacts
from whatever happened to be on the screen in that position when it
opened); this has been addressed.

TextDialogs, rather than going to the center of the entire desktop, now
center on the _current head_, which prevents the awful positioning where
half of the window is on one screen and half is on another.

Lastly, when hovering your mouse over the iconbar button for a window
with a title that's too wide to fit on the button, a tooltip is
displayed.  This tooltip themes itself to match the button, however it
wasn't using the theme properly (similarly to how TextDialog was)... and
as such, also wasn't using the proper font effects.  This has been
addressed just as it was for the TextDialog.
2011-05-16 20:03:02 +02:00
Pavel Labath
16c90dc19f Make SignalTracker always disconnect itself from Signals
previously, the tracker disconnected itself only when the caller passed withTracker = true to the
leave() function. However, the default value was for the parameter was false.

Non disconnecting from signal when stopping tracking creates very dangerous situation because the
signal still holds a pointer to the tracker. This resulted in a segfault when exiting fluxbox,
because the tracker (FluxboxWindow) got destroyed before the signal (BScreen::focusedWindowSig),
and the signal was using an invalid pointer when it tried to disconnect itself from the tracker.

Instead of setting withTracker to true by default or changing all invocations of leave(), I
decided to make the tracker disconnect itself unconditionally because I could not find a use case
for the opposite behaviour.

PS: This message is in fact longer than the actual commit.
2011-05-10 13:00:46 +02:00
Pavel Labath
7525ca9f77 Remove all trace of Observers and Subjects
this marks the completion of the transition to FbTk::Signal
2011-05-10 13:00:46 +02:00