Commit Graph

10 Commits

Author SHA1 Message Date
Julien Danjou cfac43ecdf event: regrab keys on keyboard mapping change (FS#365)
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-10-31 19:22:24 +01:00
Julien Danjou 8d1120d096 keybinding: store in globalconf
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-10-31 17:08:32 +01:00
Julien Danjou 6ac0c4130c image: merge draw_image_t and image_t
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 11:11:55 +02:00
Julien Danjou 530f27e4a1 keybinding: honor modifier state correctly (FS#264)
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-08-13 10:30:24 +02:00
Julien Danjou 9f503e5a13 lua: rename luaA_function to luaA_ref
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-08-11 10:12:36 +02:00
Pierre Habouzit 5798ef0594 Hide keybidings_t away, subsequent simplifications 2/2
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-01 08:12:22 +02:00
Pierre Habouzit 3a7dd8c715 Hide keybindings away 1/2
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-01 08:12:22 +02:00
Pierre Habouzit 5a07ee4946 Put keybindings in binary searchable arrays.
This patch sorts keybindings in arrays by keycode or keysym to speed up look
up using binary searches. This is a preliminary work to enable more powerful
keybindings stuff, where keybindings can be cascaded or why not, attached to
specific clients.

Interstingly enough, this patch saves 100ko of initial memory (Heap) usage here.

The underlying idea is that we should be able to define keybindings_t as
trees of keybindings_t which would then define key sequences.

The OO approach kind of make sense in fact, since you create a base
keybinding (e.g. reacting on Mod4-w) and then you will probably (with
appropriate apis) be able to populate new submaps from that point more or
less dynamically.

And if you have two keybindings on Mod4-w, then adding them will replace the
previous one. This means that you can fake per-client bindings with e.g.:

  k_default = keybindings.new({"Mod4"}, "w", something);
  k_mplayer = keybindings.new({"Mod4"}, "w", something_else);
  k_default:add()

and in your focus hook:

  if /* code for testing if it's mplayer */ then
      k_mplayer:add()
  else
      k_default:add()
  end

This would not work before, it does now.

It will take way more sense with submaps of course.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
2008-06-25 11:04:56 +02:00
Julien Danjou 13a96b6edd [keygrab] Add keygrabbing infrastructure
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-10 17:22:36 +02:00
Julien Danjou b6e31563d0 [lua] Add new keybinding interface
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-28 12:15:00 +02:00