Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
This was originally intended to be a bugfix for an memory error reported by valgrind (accessing
freed memory). While debugging it, I found the menu ownership semantics confusing
(setInternalMenu() et al.), so I decided to get rid of it and store it in smart pointers
everywhere.
Looking back, I'm not sure if this was worth all the trouble, but the good news is that the
valgrind error disappeared. :)
|
|
|
|
|
|
when saving/loading to/from string representation.
This is needed for the next commit.
|
|
for resources which need to work with localised strings.
|
|
Loading of an init file with the new manager works ok. Saving and restarting is still not
completed.
This touches many files because i removed the alternative name of resources. Unlike Xrm, lua does
not have native support for alt names. It should be fairly easy to add them, but I think that is
unnecessary and would be confusing.
|
|
names
|
|
|
|
|
|
|
|
this reduces typing and it makes more sense in lua, since there the resources are implemented as
hierarchical tables and the topmost table has to be handled a bit specially.
|
|
|
|
|
|
|
|
by outsourcing the conversion from string/lua to the specific type (and back) to a separate
class. This change touches a lot of files because the interface of FbTk::Resource changed
slightly. However, the changes are minor.
|
|
I added a new class, LResourceManager, which should handle loading and saving of resources like
the old ResourceManager, only it does that with the help of lua. I moved the common features of
the two managers (interface + a few functions) to a common base class ResourceManager_base. I
augmented the Resource_base class with two new functions (setFromLua and pushToLua) which are
used by the lua RM instead of getString and setFromString.
Parts of the new RM are written in lua. To avoid loading scripts from a file at runtime I decided
to link compiled lua code straight into the executable. For this purpose I created a small script
which converts a binary file into a declaration of a C array of bytes.
|
|
function
|
|
|
|
|
|
parameter
|
|
|
|
It's impossible to do this without C++0x features (we need std::exception_ptr).
|
|
See how variadic templates are good. They enabled me to write those four functions as one.
|
|
It was pretty underused anyway. I was just lazy to write a proper destructor.
|
|
|
|
std::function is superior, but not supported on old compilers
|
|
copied from conky (http://conky.sf.net) and relicensed. Since I am the person who wrote it in
the first place there should not be a problem with licence conversion.
|
|
|
|
On Windows, prepend /DUMMYPREFIX to default paths, and replace it at
runtime with the prefix relative to the exe directory.
|
|
Prep for Windows dummy prefix code.
|
|
|
|
|
|
|
|
'other-improvements' into windows-mingw
|
|
|
|
Needed for mingw-cross-env
|
|
This fixes platforms without sigaction, like Windows.
|
|
|
|
if pos is not npos, it will always be less than filename.size().
However, the access later is only safe if there is a character
after pos, which would require pos + 1 to be less than filename.size.
|
|
|
|
calling imlib_set_cache_size() before a context is created by fluxbox creates
an 'unknown' context. that one is never freed at shutdown.
|
|
|
|
|
|
|
|
93924af160ea303c94a2576b0e57a04e94c9228c 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')
|
|
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
|
|
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.
|
|
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)
|