Commit Graph

462 Commits

Author SHA1 Message Date
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
Gregor Best 10bfb36d4b wibox: add mouse_enter and mouse_leave for wibox
Signed-off-by: Gregor Best <farhaven@googlemail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-02-13 22:54:36 +01:00
Maarten Maathuis bd6e568083 event: fix configurerequest
- We have to be careful with geometry around protocol code.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-02-08 14:10:17 +01:00
Maarten Maathuis 88713851ab event: Prevent seeing banned clients on the visible screen.
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-02-03 10:30:23 +01:00
Julien Danjou f45cdee4eb event: do not store resize events of banned clients
This should fix the problem seen with Firefox. When clicking on a
file that will launch a "Save as" dialog, and switching tag quickly,
the client is banned and move off of the viewport.
Then FF send a ConfigureRequest to re-move it to this negative
coordinates, which we did handle and set as its geometries.
Now we just honor the (bad and useless) move but we do not use
client_resize()

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-01-30 15:29:33 +01:00
Julien Danjou d02403e6b9 event: fix ConfigureRequest handling (FS#424)
ConfigureRequest are sent with real X windows size, not fake size with
border and titlebar.
So we need to re-add size of borders and titlebar before calling
client_resize(), otherwise we set a X size the client can considers wrong
and then we start loopin forever since we do not handle its request to
be sized correctly.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-01-10 10:03:41 +01:00
Julien Danjou d9c868b627 client: implements per-client key bindings
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-01-05 16:59:20 +01:00
Julien Danjou d779aa6c40 client: client screen change at manage is done in Lua
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-29 12:26:01 +01:00
Julien Danjou cd667802db hooks: manage gets an extra startup arg
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-29 12:23:37 +01:00
Julien Danjou 53f58aa1a6 keybinding: move to key
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-18 11:33:52 +01:00
Julien Danjou 8193a9cf0c keygrabber: identify release events
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-16 15:02:54 +01:00
Julien Danjou 67a9f0d302 keybinding: add support for release event
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-16 12:00:51 +01:00
Julien Danjou 59c04ce3dc wibox: add mouse bindings
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-14 10:28:24 +01:00
Maarten Maathuis dbbe48898a client: Also check for struts on client_{ban,unban}
Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-14 10:28:23 +01:00
Gregor Best 0235d995c2 mouse: add object_under_pointer
Signed-off-by: Gregor Best <farhaven@googlemail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-14 10:28:23 +01:00
Julien Danjou 8b88541f0a xembed: store windows in an array
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-14 10:28:22 +01:00
Julien Danjou c3c20c4f8e client: move floating state handling to Lua
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-14 10:28:22 +01:00
Julien Danjou 26de388c4c client: add mouse_leave hook
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-14 10:28:22 +01:00
Julien Danjou 2037a053a9 layout: move layout code to Lua
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-14 10:28:21 +01:00
Julien Danjou 0e972d4845 mousegrabber: import
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-12 16:51:41 +01:00
Julien Danjou ccc6452d49 widget: change widget initialization code
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-12 16:51:41 +01:00
Julien Danjou e7abdd5cc0 event: simplify widget_getbycoords() proto
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-12 16:51:40 +01:00
Julien Danjou e3f722f024 event: simplify event_handle_widget_motionnotify() proto
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-12 16:51:40 +01:00
Julien Danjou a5de5ab48c widget: remove button property
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-12 16:51:40 +01:00
Julien Danjou 0716ecb4fd widget: remove old cache system
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-12 16:51:40 +01:00
Julien Danjou d1db6903fa luaa: check that function is not NIL before pushing and calling
Otherwise we may push unused elements because dofunction() checked
_after_ if the function was nil, or not.

Signed-off-by: Julien Danjou <julien@danjou.info>
2008-11-20 17:48:23 +01:00