Commit Graph

487 Commits

Author SHA1 Message Date
Julien Danjou e104bae294 Revert "button, key: grab all keys by default, and check for match."
This reverts commit f6d2aa3064.

Conflicts:

	key.c
2009-08-14 17:52:49 +02:00
Julien Danjou 073e0377dd Revert "key, button: use as simple table"
This reverts commit d7454f4307.

Conflicts:

	button.h
	key.h
	lib/awful/titlebar.lua.in
	lib/naughty.lua.in
	wibox.c
	wibox.h
	widget.c
2009-08-14 16:48:52 +02:00
Julien Danjou 13efd8a199 wibox: get rid of simple window
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-07-28 16:11:41 +02:00
Julien Danjou d7454f4307 key, button: use as simple table
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-07-28 10:44:54 +02:00
Julien Danjou f6d2aa3064 button, key: grab all keys by default, and check for match.
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-07-28 10:42:31 +02:00
Julien Danjou fb3c5d90c7 event: push event/key objects and then call functions
This avoid the problem we can had while modifying globalconf.keys in a
callback function from a key or button event. Now we push all matching
objects on the stack, and call each callback function. If something
modify globalconf.keys, we do not care.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-07-28 10:30:06 +02:00
Julien Danjou 339fb53d56 luaobject: add and use item system
Now, each object can store items.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-07-28 10:29:30 +02:00
Uli Schlachter d088b819f9 Remove globalconf.have_randr
This variable didn't really have any effect on anything. It was only ever
checked in a function that would never be called if this flag was false.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-17 15:53:08 +02:00
Julien Danjou e4acb74a5a luaa: split dofunction()
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-10 11:44:29 +02:00
Julien Danjou 90bc90fde4 client, wibox: go back to unmap style banning
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-10 11:44:11 +02:00
Julien Danjou dfc01b2599 event: remove need_arrange on resize
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-10 11:42:04 +02:00
Julien Danjou 3f6ab274c0 wibox: all wiboxes go into one and only one array
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-04 17:51:35 +02:00
Julien Danjou 7cc0b13eae wibox: move position handling to Lua
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-04 17:51:30 +02:00
Julien Danjou 0ca7a0fd71 widget: use orientation rather than position
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-05-10 16:17:39 +02:00
Julien Danjou 63a7b50531 event: push button state correctly to mouse grabber
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-29 17:20:12 +02:00
Julien Danjou 7d20e63bc0 event: also push the wibox on widget button events
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-29 15:00:01 +02:00
Julien Danjou d3e3c0c922 event: mouse grabbing blocks other events
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-29 13:59:13 +02:00
Mariusz Ceier ee77fce1ce Fix focus hooks calls
This patch fixes focus hooks calls - for every call to focus hook, there
should be call to unfocus hook.

Focus related info:
In this shape, awesome doesn't support multiple focused clients, that
means it follows the rule "there is only a single focus", which is not
true for MPX. To change this, I think it will need some magic with
FocusOut events handling and changes to some structures
(e.g. globalconf.screen_focus, screen_t.client_focus should be arrays) :p
Now we don't need to handle FocusOut events.

Signed-off-by: Mariusz Ceier <mceier@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-28 19:44:38 +02:00
Julien Danjou 600299a19f key: restore proper support of keysym resolution
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-28 18:17:16 +02:00
Julien Danjou ca7af35f8a event: get keysym ignoring all modifiers
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-28 17:26:15 +02:00
Julien Danjou efad1b9843 event: matching function can get data
This allows us to not request keysym computation upon each match test.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-27 17:56:06 +02:00
Julien Danjou e2b4fae3e2 key: replace key_find() by generic callback
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-27 17:52:36 +02:00
Julien Danjou d80c6e9c33 event: modularize Lua callback handling
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-27 17:46:15 +02:00
Julien Danjou 503283ac28 event: add support for AnyModifier in grabbed button
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-26 12:47:17 +02:00
Julien Danjou 21e8c0c89e button: add support for AnyButton
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-26 12:34:30 +02:00
Julien Danjou f473a107b0 cleanup #includes
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-17 16:52:25 +02:00
Julien Danjou 486ef71a7f screen: replace screens pointer by a screen_t array
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-17 16:14:09 +02:00
Julien Danjou 1a18088da5 key: stop ignoring arbitrary modifier
Before, we used to ignore Mod2 and Lock.
This is now configurable.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-15 12:01:55 +02:00
Julien Danjou cda33ca3e6 key: cleanup modifiers system
We stop retrieving useless key, since we have constant.
We also grab correctly all keycode for a keysym.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-15 12:01:54 +02:00
Julien Danjou f4221a1fdf spawn: add support for startup-notification
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-14 14:23:38 +02:00
Julien Danjou 5931bf752d wibox: use new Lua object system
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-12 15:11:33 +02:00
Julien Danjou 81033d391b client: use new object system
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-12 15:11:33 +02:00
Julien Danjou b1a59aca07 widget: widget are now full Lua object
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-12 15:11:33 +02:00
Julien Danjou be752cc81c client: change global linked list to an array
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-12 15:11:32 +02:00
Julien Danjou 6178417b61 event: leave_notify: handle titlebar correctly
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-12 14:32:36 +02:00
Julien Danjou 9f34d20f08 event: titlebar are parts of client
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-12 14:29:53 +02:00
Uli Schlachter 95457c5ab7 Move the definition of globalconf into a header file
Pretty much every single source file needs this struct, so it makes sense to
define it in a common header instead of in every single .c file.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-10 16:32:42 +02:00
Mariusz Ceier 904502552f Focus events handlers
- We are tracking focus, using FocusIn/FocusOut events handlers, so user
  should never be confused about which client has focus
- window_setfocus function generates focus change requests to the X server
- client_focus uses window_setfocus to set input focus
- revert_to when setting input focus set to Parent, compliant with
  ICCCM convention ([1])
- DEBUG flag for those who want to debug focus handlers

Most of the changes, are compliant with X11 handbook ([0]), but some
where obtained experimentally.

Kudos to Maarten Maathuis who helped a lot with this.

[0]
http://cgit.freedesktop.org/xorg/doc/xorg-docs/plain/hardcopy/X11/xlib.PS.gz

[1] http://tronche.com/gui/x/icccm/sec-4.html#s-4.2.7

Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
Signed-off-by: Mariusz Ceier <mceier@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-07 15:42:25 +02:00
Julien Danjou 4d6bf949a8 Revert "event: add FocusOut handler"
This reverts commit 31ba962065.
2009-04-06 13:27:53 +02:00
Maarten Maathuis 97fb463e76 event: also filter leave notify events
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-04 16:32:54 +02:00
Maarten Maathuis 31ba962065 event: add FocusOut handler
- I don't see why we should guess about what we recieved and whatnot.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-04 16:32:46 +02:00
Mariusz Ceier c40609642b Fix for FocusIn event handler
10.7.1 chapter of X11 ([0]) describes many cases when FocusIn event is
generated. We are interested only in one FocusIn event type - the one
that is sent to window that gains focus.
Previous 'if' failed in some cases ([1]), this one should be better.

[0]
http://cgit.freedesktop.org/xorg/doc/xorg-docs/plain/hardcopy/X11/xlib.PS.gz
page 211

[1] http://www.mail-archive.com/awesome-devel@naquadah.org/msg01958.html

Signed-off-by: Mariusz Ceier <mceier@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-03 13:10:02 +02:00
Alex Cornejo 106e6ed5ab Styling inconsistencies
Cheers,

Alex

From b5816ec55073507d4527ad3a77eae1878adb30d3 Mon Sep 17 00:00:00 2001
From: Alex Cornejo <acornejo@gmail.com>
Date: Sun, 29 Mar 2009 14:24:27 -0400
Subject: [PATCH] Fixed some styling issues.

Noticed in the latest pull that a commit introduced a lot of styling
inconsistencies, decided to remove those and others found by a simple
grep.

Signed-off-by: Alex Cornejo <acornejo@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-03-30 12:53:12 +02:00
Julien Danjou 84ee8f1f92 event: implements Bob Marley version 2
Version 1 was supposed to store somehow the mouse coordinates to drop
spurious EnterNotify.

Now, we use a simpler way: we just tell the X server we do not want to
receive this events while we are arranging, since we would get spurious
ones.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-03-12 11:49:58 +01:00
Julien Danjou 8745d691fe buttons: change grabbing method
We stop grabbing buttons on root windows. We select button press and
release events, and then we check that we have a bindings for them.
This allow to simply grab buttons on client once, and not redo such
things on arrange or mouse-over-window changes.

Most window managers do like this, anyway.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-03-12 11:49:58 +01:00
Mariusz Ceier 926f458331 event: FocusIn and FocusOut events handlers
We need to handle FocusIn event to update focused client, when client
with GAIM sends SetInputFocus message (that is FocusIn event for WM).

Signed-off-by: Mariusz Ceier <mceier@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-03-03 17:24:50 +01:00
Maarten Maathuis 3d0a7e205a event: small code harmonisation.
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-02-16 10:30:55 +01:00
Maarten Maathuis e11bc9e553 event: block stacking related changes in configurerequest.
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-02-16 10:30:42 +01:00
Maarten Maathuis 04df061aa0 event: handle border size changes in configurerequest
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-02-16 10:30:23 +01:00
Maarten Maathuis 71bd32bcb1 event: Actually modify ev->x and ev->y for banned clients.
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-02-16 10:29:56 +01:00