Commit Graph

4194 Commits

Author SHA1 Message Date
Julien Danjou 46ffccd8e2 root: fix fake_input code
This code actually belongs to 'root' since it does not send events to a
client but simply to X.
The window argument is only used in motion event, so fix that also.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-12 01:55:37 +02:00
Maarten Maathuis f6e4b76845 client: fix luadoc typo, minimize should be minimized
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-11 19:04:28 +02:00
Julien Danjou 0fcba4363a build: move manpages into their own directory
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-11 16:11:43 +02:00
Julien Danjou 7190301321 gitignore: remove awesome-client
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-11 16:10:42 +02:00
Julien Danjou d4ea61f4d3 telak: fix default timer
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-11 14:11:44 +02:00
Uli Schlachter dc82832ccf Make sure a wibox does not display garbage when made visible
This moves the call to wibox_draw() into wibox_map() which fixes garbage
being displayed if a wibox is made visible by setting its .visible.

Since wibox_draw() already calls simplewindow_refresh_pixmap(), that call is
dropped. Because wibox_need_update() just makes sure wibox_draw() is later
called, we can replace the call to wibox_draw() by this call. This should avoid
superflous updates.

Found by lua code like this:

local w = wibox({ position = "floating", bg = "#ff0000" })
w.visible = false
w.screen = 1
<do some other stuff>
w.visible = true

Signed-off-by: Uli Schlachter <psychon@znc.in>
2009-04-11 13:46:58 +02:00
Uli Schlachter ff34fd2f3b Add wibox_map() helper function
This moves some common code into a helper function to reduce code
duplication and open-coding that function all the time.

This commit doesn't cause any behaviour change at all.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2009-04-11 13:46:40 +02:00
Uli Schlachter 4574d87988 Don't update a wibox' position when it is created
For a floating wibox which isn't visible, all what wibox_position_update()
does is setting the geometry fields in the simplewindow struct. Since the next
thing luaA_wibox_new() does is setting the wibox' geometry, this call makes
no sense.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2009-04-11 13:46:34 +02:00
Uli Schlachter 99a8dbeaf7 wibox_position_update(): Skip wibox if wibox.screen is nil
If a wibox's screen is set to nil, this is reflected by setting the screen
struct member to SCREEN_UNDEF.
SCREEN_UNDEF is defined as -1. If we allow such a wibox in
wibox_position_update(), bad things will happen (globalconf.screens[-1]).

Signed-off-by: Uli Schlachter <psychon@znc.in>
2009-04-11 13:46:30 +02:00
Julien Danjou 67c96cbebc key: luaA_key_new is static
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-11 11:59:10 +02:00
Julien Danjou 301affeaed image: cleanup header declaration
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-11 11:50:55 +02:00
Julien Danjou 46ce0c1da1 widget: remove useless widget_calculate_offset()
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-11 11:50:12 +02:00
Gregor Best 680e51049e naughty: add opacity option
Signed-off-by: Gregor Best <farhaven@googlemail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-10 23:18:51 +02:00
Julien Danjou e24df900bb luaa: fix luaA_getopt_*
We let an element on the stack, that's bad.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-10 18:50:23 +02:00
Uli Schlachter 2a6d5d207d client_stack(): Only stack windows once per mainloop
I was creating 2000 wiboxes in a loop (don't ask) and creating them took
forever. According to callgrind, there were about 2 million calls to
xcb_configure_window() and most (if not all) of them were from client_stack().
Awesome spent 70% of its cpu time in these client_stack() calls.

client_stack() is O(N^2) on the number of clients (it walks the list of clients
itself twice and each call to client_stack_above() walks the list too) and O(N)
on the number of wiboxes (it walks the wibox list twice). So obviously calls to
it should be rare.

This patch makes client_stack() only set a flag which is later checked. This
should reduce the number of restacks to the bare minimum. With this patch,
neither xcb_configure_window() nor anything else client_stack() related shows
up as having a lot of calls or using much cpu time.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-10 18:15:48 +02:00
Uli Schlachter 4b82608952 Remove the argument to awesome_refresh()
awesome_refresh() had a xcb_connection_t as first argument. Since there is
only one connection to the X server, this argument doesn't really have any
alternatives to globalconf.connection and thus makes no sense.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-10 18:02:49 +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
Julien Danjou 82329ad78a dbus: refresh everything after message has been handled
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-10 13:57:27 +02:00
Uli Schlachter a076806ce0 Rename LAYER_OUTOFSPACE to LAYER_COUNT
The name LAYER_OUTOFSPACE suggests that this is a real layer on which windows
can be put, but it's only used as an integer which describes the maximum
allowed / used layer.
Therefor, renaming it to LAYER_COUNT and adding a comment which describes this
might make sense.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-10 13:35:26 +02:00
koniu 8f5f965fab screen: do not hardcode the 'default' tag
Signed-off-by: koniu <gkusnierz@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-10 11:00:06 +02:00
Julien Danjou 7fa363d3fe default theme: add fullscreen layout icons
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-08 20:32:55 +02:00
Julien Danjou a1280fe02a build: stop checking for readline
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-08 20:07:45 +02:00
Julien Danjou ae1fb5ab68 update AUTHORS
* Nikos is back
* Update years of Damien and Gregor
* Add Maarten

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-08 19:01:20 +02:00
Julien Danjou 09b166d71e version: remove product name
We only ship one binary now.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-08 18:53:53 +02:00
Julien Danjou c95e73ee61 buffer: remove useless buffer_add_xmlescaped()
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-08 18:08:44 +02:00
Julien Danjou 7dbb02adf3 awesome-client: remove socket code
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-08 17:56:25 +02:00
Julien Danjou f79cd42c33 import new awesome-client using D-Bus
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-08 17:30:18 +02:00
Julien Danjou 36f4e6cb8a awful.remote: import with remote eval
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-08 17:08:26 +02:00
Julien Danjou f7bca3271c luaa: use only one xdgHandle for all
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-08 15:47:31 +02:00
Uli Schlachter 62397eac95 wibox: add wibox_need_update()
This moves some common code into the new function wibox_need_update().

This patch is based on a patch from Julien Danjou.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-07 18:25:37 +02:00
Julien Danjou d441254412 util: remove a_strsplit()
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-07 18:00:55 +02:00
Julien Danjou 7af34ed244 luaa: use libxdg-basedir instead of our code
This is clearly more clear and portable.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-07 17:59:39 +02:00
Julien Danjou e53c77540d client: move window function into window.c
This should light client.c a bit.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-07 15:58:09 +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
Julien Danjou 63f2dd3908 build: do not depends on glib directly
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-04 16:42:08 +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
Julien Danjou 0d6d6c4fa7 client: store class and instance
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-04 13:54:51 +02:00
Julien Danjou 208406ea90 client: free icon name
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-04 13:03:15 +02:00
Julien Danjou eaec928b8c client: remove useless icon_path
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-04 13:02:30 +02:00
Julien Danjou b14b52b60c awful.mouse: set the default cursor
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-03 17:15:14 +02:00
Julien Danjou 97baf01cec luaa: add root.cursor()
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-03 17:13:30 +02:00
Julien Danjou e4b9b2b2b4 luaa: documentation fix
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-03 17:06:44 +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
Julien Danjou cbf55449a3 luaa: split spawn() into spawn.c
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-03 13:09:17 +02:00
Julien Danjou 16606c6744 luaa: only handle tables in loop check
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-03 11:44:08 +02:00
Julien Danjou c036c8d234 luaa: pop pushed value
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-03 11:25:10 +02:00
Julien Danjou 4605bf5d55 luaa: change looping detection algo (FS#488)
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-03 11:07:18 +02:00
Julien Danjou 3bf7d2ba2b struct: add void array
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-03 11:07:04 +02:00