Commit graph

116 commits

Author SHA1 Message Date
Mathias Gumz
e105de7d46 merge Sami Kerola's new build-system 2014-04-11 17:42:40 +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
Sami Kerola
73b7958770 build-sys: include config.h to all files using automake
Do not try to be too smart which compilations need config.h, as most of
them will simply because of the config.h has information about system
capabilities.
2013-05-26 10:38:10 +01:00
Mathias Gumz
59f59801fc Fix missing LogicCommands
By removing FbTk/LogicCommands.o from LDADD in src/Makefile.am (commit
06655f6) I prevented the linker to pick up FbTk/LogicCommands.o and thus
rendered all logic-commands useless.

Using a small helper object to pull in the dependency fixes this problem
without relying on manually tweaking the build system.
2013-02-13 10:50:25 +01:00
Julien Viard de Galbert
5c5ad62846 Adds the OnTab keyword for the keys file
Adding the following lines to the keys file restore the old behaviour to
use Mouse2 on tabs to start tabbing, and keep OnTitlebar Mouse2 to lower
the window.

OnTab Mouse2 :StartTabbing
OnTab Move1 :StartMoving

Note: Internal tabs are triggering both OnTab and OnTitlebar events.
2012-11-07 09:41:49 +01:00
Ryan Pavlik
5ae8bdf49d Pre-increment non-primitive types.
Found with cppcheck:
"Prefix ++/-- operators should be preferred for non-primitive
types. Pre-increment/decrement can be more efficient than
post-increment/decrement. Post-increment/decrement usually
involves keeping a copy of the previous value around and adds
a little extra code."
2012-01-04 07:53:54 +01: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
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
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
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
1e9dafdc67 fixed the default 'OnTitlebar Mouse1' actions 2010-09-04 14:41:11 +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
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
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
2c66828341 cosmetic 2010-05-05 08:42:37 +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
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
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
Mathias Gumz
80e8cd071e just use the FbTk API 2009-10-02 08:38:24 +02:00
Mark Tiefenbruck
07da360b2b more fixes for fluxconf mangling the keys file 2009-08-08 09:14:39 -07:00
Mark Tiefenbruck
f2c0175a72 add window menu and alt-tab to error case for keys file 2009-06-28 03:55:21 -07:00
Slava Semushin
5532aca916 src/Keys.cc(deleteTree): use FbTk::STLUtil::destroyAndClearSecond() instead of self-written code.
No functional change.

Signed-off-by: Slava Semushin <php-coder@altlinux.ru>
2009-03-04 21:45:52 +01:00
Mark Tiefenbruck
f5fdbab98c don't reload keys file on modifier map events, just re-grab keys 2008-11-01 17:03:32 -07:00
Mark Tiefenbruck
22f3df9aa8 break keychains after an invalid key is pressed (which unfortunately will be swallowed) 2008-10-03 22:59:14 -07:00
Mark Tiefenbruck
04a1d2a83b don't let KeyRelease events propagate to windows 2008-09-28 01:26:21 -07:00
Mark Tiefenbruck
9170de1831 another parsing fix 2008-08-22 07:14:56 -07:00
Mark Tiefenbruck
72fd5e03a4 revert focus when closing dialogs 2008-08-16 06:30:09 -07:00
Mark Tiefenbruck
fe412dbeef move interpretation of normal hints to size hint class 2008-08-16 00:22:12 -07:00
Mathias Gumz
31b47e7814 cleanup of some files 2008-08-14 07:53:38 +02:00
Mark Tiefenbruck
dcdc783324 only reload the keys file if the contents have changed 2008-05-12 12:16:37 -07:00
Mark Tiefenbruck
92c4489a7b workaround for keys files broken by fluxconf 2008-04-30 08:31:04 -07:00
Mark Tiefenbruck
611b6aa57e more fun with the window menu 2008-02-11 10:17:45 -08:00
Tomas Janousek
b61502ffbc Fix a freed memory access in Keys::doAction.
The thing next_key pointed to was getting freed in deleteTree.

Signed-off-by: Tomas Janousek <tomi@nomi.cz>
2008-02-04 18:46:24 +01:00
Mark Tiefenbruck
f3e3bb5273 check pointer, even though it shouldn't be necessary 2008-02-03 12:17:42 -08:00
Mark Tiefenbruck
9f2f65a698 make FbTk::Command a template class, split parsing information out of ObjectRegistry 2008-01-10 23:41:22 -08:00
Mark Tiefenbruck
9c105111d2 remove old svn $Id$ tags 2008-01-03 17:34:12 -08:00
Mathias Gumz
ec13263a18 decoupling, moved private datastructures to Keys.cc 2008-01-02 09:28:00 +01:00
Mathias Gumz
04cd2fd14c removed some unneeded headers 2007-12-30 16:32:53 +01:00
Mark Tiefenbruck
8516f1e2a2 changed CommandRegistry to a template class, renamed to ObjectRegistry<Type> 2007-12-15 19:36:01 -08:00
markt
8b7464046c added FbTk::CommandRegistry, decentralized command parsing, and made them auto-register 2007-12-13 05:48:00 +00:00
markt
95f9c2d680 added OnTitlebar modifier to keys file 2007-12-09 20:47:41 +00:00
markt
bb6906fa80 added special FocusIn/Out MouseOver/Out ChangeWorkspace keys 2007-11-22 20:21:47 +00:00
markt
08ebff4b31 move titlebar click handling to FluxboxWindow, fix buttons getting ungrabbed 2007-11-20 19:01:45 +00:00
markt
46c8e217ca fix alt-tab 2007-11-05 17:45:05 +00:00
markt
97f7c3e1b5 various refactoring and minor changes 2007-11-05 17:05:58 +00:00
markt
72130f350e add OnWindow modifier to keys file 2007-10-15 18:05:28 +00:00