Commit graph

4317 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
Pavel Labath
57acca0b60 Convert ToolbarItem::resizeSig to FbTk::Signal 2011-05-10 13:00:46 +02:00
Pavel Labath
79d526b968 Convert Screen::reconfigureSig to FbTk::Signal 2011-05-10 13:00:46 +02:00
Pavel Labath
e1b0decf55 Convert Focusable::attentionSig to FbTk::Signal 2011-05-10 13:00:46 +02:00
Pavel Labath
2073ae12a4 Convert FbWinFrame::frameExtentSig to FbTk::Signal
Also, I spotted a potential bug in the code. I marked the place with XXX. Someone should take a
look at that.
2011-05-10 13:00:46 +02:00
Pavel Labath
ff49160b12 Convert FluxboxWindow::hintSig to FbTk::Signal 2011-05-10 13:00:46 +02:00
Pavel Labath
6a0280aa4d Convert FluxboxWindow::layerSig to FbTk::Signal 2011-05-10 13:00:46 +02:00
Pavel Labath
e53d14e910 Convert FluxboxWindow::stateSig to FbTk::Signal 2011-05-10 13:00:46 +02:00
Pavel Labath
ad0951ca53 Remove Observers from testSignal.cc 2011-05-10 13:00:46 +02:00
Pavel Labath
4f89009c9e Convert FluxboxWindow::workspaceSig to FbTk::Signal 2011-05-10 13:00:45 +02:00
Pavel Labath
ae68b7f7cd Convert Focusable::orderSig,addSig,removeSig,resetSig to FbTk::Signal 2011-05-10 13:00:45 +02:00
Pavel Labath
19ac8e40d8 Added FbTk::MemFunBind - a functor which binds all arguments of a function 2011-05-10 13:00:45 +02:00
Pavel Labath
6cfa087536 Make FbTk::MemFun[12] inherit from std::unary/binary_function
this way, they can be used as inputs to std::bind1st and friends
2011-05-10 13:00:45 +02:00
Pavel Labath
2024f258b6 Make FbTk::MemFun[0-3] use their ResultType parameter
previously they declared the parameter, but ignored the return value of the member function. I've
changed it so they pass the return value, if it is not void. MemFunSelectArg didn't have the
ReturnType template parameter, so I added it for consistency. Since I was already editing the, I
made all the operator()s const.
2011-05-10 13:00:45 +02:00
Pavel Labath
129bac1e0f Convert Focusable::dieSig to FbTk::Signal 2011-05-10 13:00:45 +02:00
Pavel Labath
0775350fee Last round of simplification of Signal/Slot classes
- merged all the common stuff from 0,1,2,3 argument versions into one common base class
- removed ReturnType template parameter as it was instantiated with "void" everywhere and the
  current ignores the return value of the callbacks anyway
2011-05-10 13:00:45 +02:00
Pavel Labath
bef2039d2c Don't crash when a slot is deregistered in the middle of signal processing
this was possible (and used) with FbTk::Subject, but the implemetation of FbTk::Signal didn't
support it, which made it impossible to continue with conversion.
2011-05-10 13:00:45 +02:00
Pavel Labath
144d716a42 Simplify Slot.hh
Replace CallbackHolder, FunctorHolder and SlotHolder with a (smaller) set of polymorphic classes.
SignalHolder now stores a (smart) pointer to the class.
2011-05-10 13:00:45 +02:00
Pavel Labath
4b47675441 Make RefCount<> more sensible
the previous version of operator*() made no sense. E.g., it violated the invariant
(*ptr).foo <=> ptr->foo. The dereferencing operator now returns a reference to the pointed-to
object, rather than a pointer to it.

I also added a bool conversion operator, which can be used in testing the NULL-ness of the
pointer. Anyone wondering if that could be done in a simpler way is encouraged to read
<http://www.artima.com/cppsource/safebool.html>.

And, finally, I removed the mutable flag from the m_data member, since it does not need it.
2011-05-10 13:00:45 +02:00
Pavel Labath
fa15400cc2 Remove the Observer dependency from FbTk::Menu 2011-05-10 13:00:45 +02:00
Pavel Labath
f7d7dfd2a8 Convert FbTk::Theme::reconfigSig and friends to the new Signal system
I removed the const versions of reconfigSig() in the process since FbTk::Signal has no const
methods anyway.
2011-05-10 13:00:45 +02:00
Pavel Labath
54230c9a44 Simplify FbTk::Signal template classes a bit
basically, i just got rid of Signal[0-3] classes and moved their contents to the appropriate
specialization of FbTk::Signal

also, this fixes the
no matching function for call to 'MemFunIgnoreArgs(FbTk::Signal<void, FbTk::SigImpl::EmptyArg,
FbTk::SigImpl::EmptyArg, FbTk::SigImpl::EmptyArg>&, void (FbTk::SigImpl::Signal0<void>::*)())'
error i had in the following commit.
2011-05-10 13:00:44 +02:00
nacitar sevaht
1dacf57d20 Can check CARDINAL properties in CLIENT PATTERNS
Introduces a new member function, FbWindow::cardinalProperty()

This change also changes other code that previously used
FbWindow::property() to do the same thing as the new function; this
reduces code duplication.

There are still some bits of code (Ewmh.cc, extractNetWmIcon()) that use
FbWindow::property() to retrieve XA_CARDINAL values, but as the new
method is designed for getting a _single_ property, and that code uses
FbWindow::property() to retrieve the number of values present, and then
grab all of them; it's a different use case.  I opted to not try to make
cardinalProperty() into some monolithic all-purpose cardinal method;
FbWindow::property() works just fine for that.

This change also adds an optional (default=NULL) boolean to
FbWindow::textProperty and friends that allows the caller to determine
whether or not a value was actually retrieved.  This was necessary for
integrating FbWindow::cardinalProperty with the codebase, and it seemed
to fit with FbWindow::textProperty as well.  Prior to this change, if
you got a return value of "", you wouldn't know if you successfully
retrieved the value which happened to be blank, or if you failed to
retrieve the value.  Now, you can pass the address of a boolean if you
so choose in order to differentiate these situations; the same applies
to the new FbWindow::cardinalProperty().
2011-05-08 07:48:03 +02:00
Pavel Labath
de2cca8988 Include src/tests in the distribution tarball
and add a configure option for building them (default: off).
This patch fixes an error when configuring the tarball, where configure complained it cannot find
src/tests/Makefile.in.
2011-05-07 12:39:04 +02:00
Pavel Labath
38b678e4cb Make sure `make distcheck' is successful
- added rmdir commands to uninstall rules of all Makefiles under data/styles
- added \n at the end of files which had none
2011-04-27 12:10:12 +02:00
Mathias Gumz
be90145227 bugfix: do not warp workspaces with only one workspace 2011-04-25 11:33:20 +02:00
Pavel Labath
86c9b100f3 Fix VPATH builds 2011-04-18 08:50:44 +02:00
Pavel Labath
8b6943ab1c Fix a couple of "comparison between signed and unsigned" warnings 2011-04-15 21:36:04 +02:00
David Coppa
870d4d02ee bugfix: use 'unsigned long' to feed XChangeProperty, closes #3285968
old code crashed on sparc64, pid_t seems to be 32bit on that platform.
2011-04-14 15:08:02 +02:00
Pavel Labath
a83cedf37e Fix a pair of warnings reported by clang 2011-04-11 08:37:58 +02:00
Pavel Labath
91958279d3 Menu.cc: send debug output to cerr, make the output more sensible 2011-04-11 08:31:52 +02:00
Gediminas Liktaras
b1d70e2c92 bugfix: return 'height' if container is rotated vertically, closes #3195728
iconbar.iconWidth property was ignored due this bug.
2011-04-03 13:20:35 +02:00
Daniel Diaz
d28e105075 compile fix: added <cstdlib> to provide declaration for 'size_t' (gcc-4.6.x likes it that way) 2011-03-28 09:06:22 +02:00
Mathias Gumz
d4f7f17330 compile fix: arguments must match declaration
Sun CC++ 5.11 complaint on linking about missing symbols 'nextWorkspace()',
'prevWorkspace()' etc.
2011-03-23 18:45:34 +01:00
Mathias Gumz
745fb8e71c removed useless code 2011-03-23 18:41:48 +01:00
Mathias Gumz
21022a1952 cosmetics 2011-03-23 12:03:17 +01:00
Mathias Gumz
9086ccafbe compile fix: sunCC again, wants a compile time constant for arrays 2011-03-23 12:03:08 +01:00
Mathias Gumz
e850b01919 compile fix: sunCC 5.11 (sunstudio 12) compiles and links again
biggest change: renaming of 'class Layer' to 'class ResourceLayer' in
Layer.hh to handle complaints about 'ambiguous Layer: Layer or FbTk::Layer'.
'ResourceLayer' sounds crappy, but that was the best I could come
up with right now.
2011-03-23 12:02:15 +01:00
Mathias Gumz
7ece90ad4f merge 2011-03-19 20:12:05 +01:00
Mathias Gumz
9f2c37341c code cleanup: moved code from public API to implementation
renamed 'Region' to 'Area' to avoid conflicts with 'Region' from Xlib.
2011-03-19 19:29:43 +01:00
Henrik Kinnunen
0b6c860fa0 delete config menu first at shutdown 2011-03-19 19:19:26 +01:00
Mathias Gumz
97e08c3853 bugfix: reposition windows only if they are invisible
changing the layout or the number of the attached monitors
might lead to invisible windows. only those windows should be
positioned to the closest monitor, if they are not visible
already.
2011-03-19 15:05:39 +01:00
Mathias Gumz
c200045e9a code deduplication: use RectangleUtil::insideBorder() 2011-03-19 15:01:16 +01:00
Mathias Gumz
767afd32f3 prepare BScreen::XineramaHeadInfo to be 'RectangleLike' 2011-03-19 15:00:34 +01:00
Mathias Gumz
a798e0e0ff added RectangleUtil::overlapRectangles() + test cases 2011-03-19 14:56:45 +01:00
Mathias Gumz
bcae4e257d added tests/testRectangleUtil.cc 2011-03-18 17:57:34 +01:00
Mathias Gumz
253f13d46e some love to src/tests, use automake to use the same build environment as the rest of fluxbox 2011-03-18 15:51:17 +01:00
Mathias Gumz
81b240e976 compile fix for clang, forward declaration of FocusControl was not enough 2011-03-18 11:01:08 +01:00
Mathias Gumz
3a3df51823 compiler cosmetic: changed return type of ScreenPlacement::placeAndShowMenu() to void, closes #3204402 2011-03-18 07:53:53 +01:00
Mathias Gumz
a53017cc3b bugfix: do not use anything from the current ClientMenuItem after m_client.focus(), closes #3210493
m_client.focus() might call ~ClientMenuItem(), thus m_client is not available anymore. the crash was triggered by trying to deiconify a client via the clientmenu. this triggers a signal to remove and destroy the current ClientMenuItem.
2011-03-15 09:49:06 +01:00
Mathias Gumz
bb2ce5df8a fix misordered Toolbar::Placement strings, closes 3195721 2011-03-01 14:32:21 +01:00
Mathias Gumz
d2e7feaa85 bugfix: submenus didn't hide if a delay was set
use the FbTk::Timer API correctly, bug(s) introduced by

   1f0adef4da
   e685117941
2011-02-25 18:39:48 +01:00
Mathias Gumz
798ecb88d5 cache result of getWorkspace() 2011-02-24 16:56:53 +01:00
Mathias Gumz
4a161132c2 better solution for warping transient windows
see #3088856 / 09f99a4674.

at the moment this fix looks side-effect free, time will tell.
2011-02-24 16:55:55 +01:00
Mathias Gumz
09f99a4674 intermediate fix for segfault when warping transient windows to different workspace, see #3088856
warping a transient window to the next workspace creates a cycle between
BScreen::changeWorkspaceID(), BScreen::reassociateWindow(), Workspace::removeWindow(),
FocusControl::unfocusWindow(), FluxboxWindow::setCurrentClient(), FluxboxWindow::focus()
and so on.

for now we just stop allowing transient windows to be warped, it is most
likely a bad idea anyway having the modal dialog on one workspace and the
(dead) main window on another one.

this issue must be analyzed further, since there might be a deeper problem
with the way the focus code works.
2011-02-24 15:59:34 +01:00
Mathias Gumz
35753c7c3f fix calculating the width / height of SystemTray (closes #3150939) 2011-02-24 15:00:22 +01:00
Mathias Gumz
39871695cf SystemTray tool should use the right fallback resource 2011-02-24 14:58:15 +01:00
Mathias Gumz
3c924a251a removed unused headers 2011-02-24 11:21:29 +01:00
Mathias Gumz
f0ffaf890f moved Menu placement into ScreenPlacement::placeAndShowMenu() 2011-02-24 11:21:16 +01:00
Mathias Gumz
49623390b6 little helper function 'isTitleVisible()' for FbTk::Menu 2011-02-24 11:17:48 +01:00
Mathias Gumz
1bb30855bb code deduplication 2011-02-24 11:16:16 +01:00
Mathias Gumz
6febc40c47 bugfix: place WindowMenu correctly upon first call (closes #2731524)
FbTk::Menu::updateMenu() recalculates the width() and height() of the
window. this must be done before the menu is moved to fit completely
onto the screen.

the 'menu().raise()' command is not needed, that is done inside
'menu().show()' already.
2011-02-24 00:26:32 +01:00
Mathias Gumz
9616a676d8 renamed FbTk::XLayer to FbTk::Layer and FbTk::XLayerItem to FbTk::LayerItem 2011-02-23 22:49:27 +01:00
Mathias Gumz
813e6c4402 disabled overhead base classes 'FbTk::Layer' and 'FbTk::LayerItem'
had to add <algorithm> at various other files as a result of this change.
2011-02-23 22:46:13 +01:00
Mathias Gumz
c859ae3987 irrelevant 'virtual' destructor 2011-02-23 21:47:16 +01:00
Mathias Gumz
32cc4ba69b code deduplication 2011-02-23 21:45:50 +01:00
Mathias Gumz
504fd5c4fa updated year and copyright info 2011-02-23 21:42:51 +01:00
Mathias Gumz
1797d6895c almost 10 years of fluxbox 2011-02-23 17:19:27 +01:00
Henrik Kinnunen
23d67b7f14 merged crash fix 2011-02-23 07:54:20 +01:00
Henrik Kinnunen
bb3f955e0f Fixed possible crash issue when getting an unmap before a focus in event.
The issue was caused by a client that got an unmap notify and had a FocusIn event
directly after in the event queue. The focus in event was handled by Fluxbox::revertFocus
before the WinClient.cc removed itself from the search window list.
2011-02-23 07:38:45 +01:00
Mathias Gumz
6fb2960756 moved rarely used 'cpccpc' out of class declaration 2011-02-22 22:33:56 +01:00
Mathias Gumz
4f921f77f4 don't use hardcoded references to positions in the menu 2011-02-22 22:17:11 +01:00
Mathias Gumz
d11aa42ace bugfix: consistent use of 'int' for alpha values (#3187373)
WindowMenuAccessor returned strange alpha values if compiled
with 'g++ -Os'; unholy black magic happens if template<int> faces
functions returning only 'usigned char'.
2011-02-22 22:07:39 +01:00
Mathias Gumz
b7e84104a6 bugfix: render 'sunken' gradients correctly 2011-02-22 15:53:18 +01:00
Mathias Gumz
3c7407beb4 use FbTk::StringUtil API 2011-02-22 15:18:53 +01:00
Mathias Gumz
84a81a1ac1 renamed Texture:DEFAULT_BEVEL to Texture::DEFAULT_LEVEL 2011-02-22 15:18:20 +01:00
Mathias Gumz
0569849c6d cosmetics 2011-02-22 15:17:15 +01:00
Mathias Gumz
78adeb2919 Bugfix: don't render textures with dimension of 0
At least 'invertRGB()' does not like 'width' or 'height' being 0.
341b2f43e5 was triggered by this problem as well.
2011-02-22 12:32:16 +01:00
Mathias Gumz
92deeba2a0 Render rectangles instead of squares to test TextureRender.cc 2011-02-21 20:49:10 +01:00
Mathias Gumz
341b2f43e5 Fix bug: 'src_image' might be NULL if width||height are 0 (#3188223)
With ROT90-SystemTray fluxbox crashed. It is a bit unclear of where
to catch pixmaps / windows with either width or height equal to 0; IMHO
this needs more investigation.
2011-02-21 19:21:38 +01:00
Henrik Kinnunen
34bf3b4833 Fixed a possible crash when using a slot m_holder = 0 2011-02-20 15:48:42 +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
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
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
e0c440f599 pushed to early ... 2010-09-19 08:48:35 +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
Mathias Gumz
75b9a4ed72 bugfix: free the shape-corners on the last used 'Shape'
the global 's_corners' vector was still used on an application shutdown
(including ctrl-c SIGINT). depending on when 's_corners' was created on
the stack this could lead to an exception ('pure virtual called') while
trying to free the 'FbPixmaps' without having a valid
'FbTk::Application::instance()' left.
2010-09-14 16:54:08 +02:00
Mathias Gumz
36893ac7f9 bugfix: small typo in last cleanup prevented loading workspace names 2010-09-14 12:24:20 +02:00
Mathias Gumz
b10d58588a cosmetic code cleaning
* use FbTk::StringUtil::number2String() to avoid 'sprintf'
* use FbTk::Util::clamp()
* use FbTk::STLUtil::destroyAndClear()
* whitespaces
2010-09-13 22:07:10 +02:00
Mathias Gumz
deb6a1ebf4 code simplification
we do not need a std::map just to store an attribute on an AtomHandler,
it makes housekeeping just more annoying.
2010-09-13 22:04:24 +02:00
Mathias Gumz
f6af17aa58 code simplification 2010-09-13 21:59:09 +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
51f054e777 added '(workspace=[current])' to our default keys
commit 882a50fe1d removed the hardcoded limit to
cycle to windows on other workspaces, though it was and IS a good default
behaviour. if users do not want this (they want to cycle to windows on other
workspaces), they should explicitly avoid '(workspace=[current])' in their
keysfile.
2010-09-11 21:53:55 +02:00
Mathias Gumz
faa4c97888 added 'SetXProp' action and (@PROP=foo) clientpattern
these two allow 'tagging' of arbitrary windows with 'tags' (or 'labels'). such 'tagged' windows can then be used in ':NextWindow (@PROP=foo)' commands to quickly cycle through a subset of available windows.
since the 'tags' are applied as real xproperties to a window they survive a restart of fluxbox or even another windowmanager. the user can also set the tags by using xprop(1).

the next step regarding the UI should be to visualize the tags of a window.
2010-09-11 17:09:07 +02:00
Mathias Gumz
4e2c7e2167 moved helper struct TextPropPtr into anonymous namespace 2010-09-10 16:36:17 +02:00
Mathias Gumz
a6ed9498cc code cleanup
* moved code from public API to internals
* avoid code duplication ( while(!m_terms.empty()) ...)
* cosmetic '(*it)->' vs 'term.'
2010-09-10 16:35:49 +02:00
Mathias Gumz
882a50fe1d removed hardcoded limitation to cycle/focus windows on all workspaces
reasons:

* fixes #1732115, allows to have chatwindows on another workspaces and reach them via :NextWindow (urgent=yes)
* old behavior can be achieve by using the (workspace=[current]) pattern
2010-09-10 13:32:47 +02:00
Mathias Gumz
8a7c117153 disabled potentially dead code 2010-09-09 23:24:47 +02:00
Mathias Gumz
ecdaba2874 simpler code 2010-09-09 23:24:27 +02:00
Mathias Gumz
ffd5f28072 removed dead code 2010-09-09 23:23:52 +02:00
Mathias Gumz
7fdb0676a7 bugfix: initialize the Shape of a menu AFTER we created the window for the menu
on startup a lot of 'Fluxbox: X Error: BadDrawable (invalid Pixmap ...)' occured.
this was caused by using an empty 'Window' to create the shape.
2010-09-09 23:23:33 +02:00
Mathias Gumz
2b9a38cba5 minor cleanup 2010-09-09 15:33:34 +02:00
Mathias Gumz
534db1d409 reduced 'switch/case' and 'else if' hell a little bit 2010-09-09 15:33:12 +02:00
Mathias Gumz
77f39235cf added FbTk::Util::clamp() and simplified related code 2010-09-09 15:31:54 +02:00
Mathias Gumz
1657374940 use FbTk apis instead of raw xlib calls 2010-09-09 12:48:19 +02:00
Mathias Gumz
e685117941 simpler to use FbTk/Timer api 2010-09-09 12:47:38 +02:00
Mathias Gumz
82d0de9ef4 cosmetic 2010-09-08 22:31:41 +02:00
Mathias Gumz
8a08110f19 simpler way of expressing 'Singleton' for 'FbAtoms' 2010-09-08 22:09:06 +02:00
Mathias Gumz
dc5a105c3e fixed code duplication 2010-09-08 21:52:13 +02:00
Mathias Gumz
7a149626e6 improved 'escapeRememberChars()' routine by traversing the string only once
removed obsolete 'getuint()' function
2010-09-08 21:45:33 +02:00
Mathias Gumz
48cc67965b avoid code duplication 2010-09-08 21:43:38 +02:00
Mathias Gumz
b76be98227 improved extract*Number functions from FbTk/StringUtil.cc 2010-09-08 21:42:48 +02:00
Mathias Gumz
6ecfa0ef3e cosmetic fix: looks like a copyNpaste issue 2010-09-08 20:48:37 +02:00
Mathias Gumz
26c1cd0cee code simplification 2010-09-08 20:48:01 +02:00
Mathias Gumz
f4fab105ff avoid code duplication 2010-09-08 20:18:28 +02:00
Mathias Gumz
64afa48bb3 removed unused code 2010-09-08 20:17:36 +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
1e8fe2bc14 removed redundant if-statement 2010-09-08 11:19:49 +02:00
Mathias Gumz
8feb0b8c83 avoid constructing new strings implicit 2010-09-05 10:49:05 +02:00
Mathias Gumz
83656fc0e8 cosmetic 2010-09-05 10:47:12 +02:00
Mathias Gumz
63f9c8c1a2 reuse temporary memory for reencoding / reordering fribidi-strings 2010-09-05 10:47:01 +02:00
Mathias Gumz
60c92b96f2 added info about 'BIDI' support to 'fluxbox -info' 2010-09-05 08:49:13 +02:00
Ken Bloom
ea98db4140 added support for bidirectional text 2010-09-04 15:01:33 +02:00
Mathias Gumz
b1b2f47e7d minor code simplification 2010-09-04 14:41:39 +02:00
Mathias Gumz
1e9dafdc67 fixed the default 'OnTitlebar Mouse1' actions 2010-09-04 14:41:11 +02:00
Mathias Gumz
b8987fc623 code simplification / deduplication
* parse the string only once for a bunch of chars to check instead of
  starting over again and again from the beginning, created a helper
  function to do this (FbTk::StringUtil::findCharFromAlphabetAfterTrigger)

* put same code into a function (setClockModeLabel())

* use much simpler code to switch between 12h and 24h mode and replace
  the fmt-switches
2010-08-24 17:30:24 +02:00
Mathias Gumz
874eb67297 moved knowledge about '_NET_SYSTEM_TRAY_S' into the 'SystemTray' class 2010-08-23 19:49:47 +02:00
Mathias Gumz
a1385e4018 fixed compiler warning 'comparison between signed and unsigned integer expressions' 2010-08-23 19:44:21 +02:00
Mathias Gumz
e23c2c4d1b reenable clickRaise(), but on any button press if no key-action was found 2010-08-23 10:54:49 +02:00
Mathias Gumz
23f56d108f bugfix: compiler warning 2010-08-22 20:11:59 +02:00
Mathias Gumz
442c651d64 fixed compiler warnings regarding signed/unsigned and () around expressions 2010-08-22 14:44:31 +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
b4e65724ef fixed typo 2010-08-16 18:27:00 +02:00
Jim Ramsay
a3b063292c bugfix: another crash when cleaning up signals
While 769130f51a did fix one issue, it introduced another by changing the
logic related to the new SignalTracker.  The original logic (introduced in
9ad388c5bf) was:
  -> in 'leave(Signal)', only call 'disconnect'
  -> in 'leaveAll()', call 'disconnect' and 'disconnectTracker'
But 769130f51a inverted this, calling 'disconnectTracker' in both cases but
only 'disconnect' in the 'leaveAll()' case, which would leave unattached signals
around after calling 'leave(Signal)'.

This fix not only repairs the logic, but renames the ambiguous 'disconnect'
boolean to something more explicit: 'withTracker'.
2010-07-14 11:36:00 -04:00
Jim Ramsay
37a24132b5 Implement StrictMouseFocus
As noted in the previous commit, StrictMouseFocus now works as advertised:
  Focus follows mouse on every EnterNotify event (except when the "ClientMenu"
  closes or during alt+tab window cycling)
2010-05-28 15:50:15 -04:00
Jim Ramsay
cdbaf5c04d Add new focus model: StrictMouseFocus
This is not actually implemented yet, but from now on, "MouseFocus" means:
  Focus follows mouse only when you are moving the mouse, any EnterNotify events
  caused by non-mouse operations (window closing, keycommands, changing
  desktops) will *not* shift focus

And once fully-implemented, "StrictMouseFocus" will mean:
  Focus follows mouse on every EnterNotify event (except when the "ClientMenu"
  closes or during alt+tab window cycling)
2010-05-28 15:10:28 -04:00
Mathias Gumz
769130f51a bugfix: do not use invalid iterators while looping thru a container which gets destroyed 2010-05-23 15:58:35 +02:00
Mathias Gumz
fbcdd34b22 mostly cosmetic fixes, mainly discovered by 'clang --analyze'
reordering of Resource-related stuff was because of

   "error: explicit specialization of 'getString' after instantiation"

complaints.
2010-05-23 12:25:47 +02:00
Mathias Gumz
ff9c68e247 fixed potential memory leak 2010-05-16 14:25:59 +02:00
Mathias Gumz
17b21635a2 cleanup created corner pixmaps, moved the initCorners() function out of the class 2010-05-16 14:25:36 +02:00
Mathias Gumz
04739b2d1f initialize all member variables, otherwise unclean state in some circumstances
(valgrind complained a lot about ::updateGeometry() accessing uninitialized variables)
2010-05-16 14:24:34 +02:00
Mathias Gumz
b8f9ac6d69 prevent crash if m_keylist is 0
again, i do not know yet, why this could happen.
2010-05-08 19:04:44 +02:00
Mathias Gumz
24cfd54eae cleanup: missing initialization
i ran across problems on a freshly installed ubuntu without
any config files, m_keylist was not initialized, yet unsure why.
2010-05-08 19:03:57 +02:00
Mathias Gumz
bca59851f3 bugfix: crash when cleaning up signals
22fa5f544b was not fixing anything, the real cause is that the
SignalHolder still has a reference to a not existing Tracker.
2010-05-07 09:36:30 +02:00
Mathias Gumz
615e9cec32 compile fix: FD_ZERO (sys/select.h) on solaris wants to use memset(); closes #2997117 2010-05-06 21:19:31 +02:00
Mathias Gumz
5be5edc1e5 bugfix: when maximizing a shaded window, unshade it before 2010-05-06 20:54:44 +02:00
Mathias Gumz
22fa5f544b bugfix: added missing 'virtual' keyword, otherwise fluxbox crashes with 'pure virtual method called' 2010-05-06 20:25:47 +02:00
Mathias Gumz
a443d46117 bugfix: resizing/moving a maximized window via keys do not end maximization state (#2980313) 2010-05-06 20:09:59 +02:00
Mathias Gumz
a2f809f8f2 added little helper function to disable the maximization state of a window while keeping its current position / size 2010-05-06 20:07:56 +02:00
Mathias Gumz
d2a7cc60a2 bugfix: resizing stops _NET_WM_STATE_MAXIMIZED*, so trigger signal to set the properties correct
fixes partly #2980313, resize with keys still does not trigger _NET_WM props to be correct
2010-05-05 22:30:42 +02:00
Mathias Gumz
b43be7144f upgrade CONFIG_VERSION to 11 2010-05-05 22:05:28 +02:00
Mathias Gumz
2c66828341 cosmetic 2010-05-05 08:42:37 +02:00
Mathias Gumz
fbcb0cd7e1 use maximize options for fullscreen as well 2010-05-05 08:42:28 +02:00
Mathias Gumz
a10bab0f7c added OnLeftGrip, OnRightGrip, OnWindowBorder modifiers for keys file
this allows to move some hardcoded keysbindings into the keys file and
makes the code simpler
2010-05-05 08:41:03 +02:00
Mathias Gumz
35f17d22b5 cosmetic 2010-05-01 14:29:41 +02:00
Mathias Gumz
b3361eae02 use new closest head calculation code to place windows when clearing up heads 2010-05-01 14:29:31 +02:00
Mathias Gumz
d6bc8d753e bugfix: moving (the center of) a maximized window out of a xinerama head could result in maximizing it over all heads
the old way of deciding which head to (re)maximize the current window
was to just test if the center of the window is INSIDE which head.

now we calculate the closest head which fixes the problem
2010-05-01 14:27:45 +02:00
Mathias Gumz
583398e491 bugfix: using 'int' on 64bit systems while setting window properties is wrong
using a smaller type ('long' on 64bit is 8 byte, 'int' is 4) results in
strange properties, eg:

  _NET_WM_STATE(ATOM) = _NET_WM_STATE_MAXIMIZED_HORZ, undefined atom # 0x2726130

(when xpropping a maximized xterm). this might cause misbehavior in apps.
2010-04-30 09:03:57 +02:00
Henrik Kinnunen
dd8fcc8b7b Changed title signal in Focusable to new signal system 2010-03-26 18:15:45 +01:00
Henrik Kinnunen
9ad388c5bf Added Tracker interface for SignalHolder.
This is used by SignalTracker so Signals can disconnect from it when
they die.
2010-03-26 18:04:58 +01:00
Henrik Kinnunen
1cae9f22f8 Minor fix for argument reference in MemFunSelectArgImpl 2010-03-26 18:00:23 +01:00
Henrik Kinnunen
5bc782561b Initialize all variables in FbWindow 2010-03-26 17:28:18 +01:00
Henrik Kinnunen
43837f82e1 Added simple stress test in python 2010-03-20 00:29:39 +01:00
Henrik Kinnunen
f150f727b2 Added SelectArg.hh to Makefile.am 2010-03-19 02:32:17 +01:00
Henrik Kinnunen
ceff86b794 Added SelectArg and MemFunSelectArg*
The MemFunSelectArg* functions can be used to select
a specific argument from a signal. For example this would
select the string argument as argument to the callback:

Signal<void, int, float, string> signal;
signal.connect(MemFunSelectArg2(obj, &Object::takesOneStringArg));
signal.emit(10, 3.14, "hello");

...

void Object::takesOneStringArg(const string& value) {
...
}
2010-03-19 02:23:41 +01:00
Henrik Kinnunen
68e90ab84f Added missing RelaySignal.hh to Makefile.am 2010-03-18 19:47:14 +01:00
Henrik Kinnunen
6ed8369d57 Changed Focusable::focusSig() to new signal system.
The focus signal emits the window that had the focus status changed.
2010-03-18 19:41:35 +01:00
Henrik Kinnunen
02bb93590c Added FbTk::relaySignal, which relays new signals to old Subject type signals. 2010-03-18 19:35:19 +01:00
Henrik Kinnunen
31a458f365 Fixed so testDemandAttention compiles 2010-03-18 12:08:03 +01:00
Henrik Kinnunen
18570d83a2 minor cleaning in MemFun.hh 2010-03-18 10:56:15 +01:00
Henrik Kinnunen
0504de454a Added MemFunIgnoreArgs which ignores aditional arguments.
For example connecting a function that takes two arguments
to a signal that emits three arguments:
struct Functor {
    void show(int a, int b);
};
Functor f;
Signal<void, int, int, int> s3;
s3.connect(MemFunIgnoreArgs(f, &Functor::show));
2010-03-18 10:45:33 +01:00
Henrik Kinnunen
ce0b41c847 Changed #ifdef DEBUG ... cerr << to using fbdbg.
This will reduce the number of #ifdef DEBUG for
simple debug messages.
include "Debug.hh" and use fbdbg instead of cerr for debug.
2010-03-17 16:35:07 +01:00
Mathias Gumz
254bc96daf fixed little preprocessor error 2010-02-27 10:33:06 +01:00
Mathias Gumz
c65dc30fc2 improved documentation of the code 2010-01-19 20:20:13 +01:00
Mathias Gumz
a2f673ccaf optimization of how often fluxbox checks for the system time to display it in the clocktool
the idea (as a first patch) for this change was provided by
Thomas Habets (thomas at habets pp se). instead of having a
fixed interval each second, we now calculate the next point in
time based upon the format string used by the clocktool to render
the time. as long as no seconds are shown fluxbox now wakes up
once every minute.
2010-01-19 20:19:45 +01:00
Mathias Gumz
46261a8284 implemented 'MoveN' and 'ClickN' support in keys file.
the hardcoded 'OnTitlebar Mouse1 :Raise' (see Window.cc, FluxboxWindow::buttonPressEvent())
is disabled for now, should be added to fluxbox-update_configs
2009-12-18 08:05:07 +01:00
Michal Zime
69d80c5905 Keep 'maximum/fullscreen' when moving a window between different heads 2009-11-23 21:11:04 +01:00
Mark Tiefenbruck
8def80cec3 reportedly fix compiling on gcc 4.4 on Solaris 2009-10-08 00:18:43 -07:00
Mathias Gumz
6645688880 definition should match declaration 2009-10-03 13:53:13 +02:00
Mathias Gumz
69bf3965b7 compile fixes for sun compiler 5.10: class Layer conflicts with class FbTk/Layer .. so just a little renaming 2009-10-03 13:53:00 +02:00
Mathias Gumz
a973154c66 compile fixes for sun compiler 5.10: 'i want an extern C function ptr' 2009-10-03 13:40:32 +02:00
Mathias Gumz
f2ea245f1d compile fixes for sun compiler 5.10: complains about 'not beeing able to initialize this from that' 2009-10-03 13:38:41 +02:00
Mathias Gumz
54c58bba21 cosmetic: use FbTk::StringUtil::number2String() 2009-10-03 09:06:34 +02:00
Mathias Gumz
80e8cd071e just use the FbTk API 2009-10-02 08:38:24 +02:00
Mathias Gumz
261ba26d27 another little helper for FbTk::StringUtil: extractNumber() 2009-10-01 21:16:46 +02:00
Mathias Gumz
4eeac74a3d removed unused code 2009-10-01 08:58:56 +02:00
Mathias Gumz
65a45dc65f compile fix: missing include guards 2009-10-01 08:57:46 +02:00
Mathias Gumz
c4c96ec830 simpler code 2009-10-01 08:57:31 +02:00
Mathias Gumz
710ad1d456 compile fix: taken 'FbTk' out of includepath, Layer.hh and FbTk/Layer.hh confused the sun compiler 2009-10-01 08:42:00 +02:00