Commit Graph

4374 Commits

Author SHA1 Message Date
Julien Danjou 4db50647fe awful.widget.common: remove otable usage
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-12 15:11:33 +02:00
Julien Danjou 6b3c57970e telak: remove otable usage
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-12 15:11:33 +02:00
Julien Danjou c47b5daf75 tabulous: stop using otable
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-12 15:11:33 +02:00
Julien Danjou 527bbfa0e0 awful.titlebar: remove otable usage
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-12 15:11:33 +02:00
Julien Danjou 3173e698da refcount: remove
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-12 15:11:33 +02:00
Julien Danjou 22b0fe8140 awful.tag: do not use otable() anymore
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-12 15:11:33 +02:00
Julien Danjou e4ab810154 awful.client: do not use otable()
We use a weak-keyed-table, that's enought and quicker.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-12 15:11:33 +02:00
Julien Danjou a4a745d505 luaa: rename luaA_toudata2() to luaA_toudata()
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-12 15:11:33 +02:00
Julien Danjou 7da55e899b luaa: remove luaA_toudata()
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-12 15:11:33 +02:00
Julien Danjou d728875969 luaa: remove luaA_checkudata
We do not need it with the new system.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-12 15:11:33 +02:00
Julien Danjou 7b75f9711d luaa: remove useless DO_LUA_*
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-12 15:11:33 +02:00
Julien Danjou 29b5fd1f25 button: use new Lua object system
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-12 15:11:33 +02:00
Julien Danjou 5f6aed4e3d key: use new Lua object system
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-12 15:11:33 +02:00
Julien Danjou 4531a3a17c tag: use new Lua object system
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-12 15:11:33 +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 541d4f565f image: use new object system
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-12 15:11:32 +02:00
Julien Danjou 38a79ca9f0 luaa: checktype use both toudata
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-12 15:11:32 +02:00
Julien Danjou 70cbf6bedb luaa: implement luaA_toudata() with simple pointer
This is needed for new object system.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-12 15:11:32 +02:00
Julien Danjou 74e4200176 luaa: split tostring creation
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-12 15:11:32 +02:00
Julien Danjou a1480ef7d8 luaobject: import
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-12 15:11:32 +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 87c3c02b72 array: add a set of useful functions
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-12 15:11:32 +02:00
Julien Danjou e145afec53 array: add foreach() statement
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-12 15:11:32 +02:00
Julien Danjou 82dd52ad69 awful.titlebar: do not call update on changes
We have hooks to do that.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-12 15:05:33 +02:00
Julien Danjou d63b850b98 awful.titlebar: add floating
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-12 15:00:11 +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
Thomas Brunko 991c795629 awful.titlebar: more buttons added
This is a new version of 'titlebar.lua'. There are now additional buttons for:
- setting the 'ontop' attribute
- setting the 'sticky' attribute
- maximizing the client
In addition to changing the state of the client the buttons also show if the
corresponding state is active for a client. All new buttons now require 4
images for:
- unfocused window, state inactive (i.e. ontop == false)
- unfocused window, state active (i.e. ontop == true)
- focused window, state inactive (i.e. ontop == false)
- focused window, state active (i.e. ontop == true)
It's not difficult to add more buttons with any kind of functionality. User
configuration is currently restricted to theming of the buttons. Buttons are
disabled simply by not configuring them in the theme.  The icons for the new
buttons are taken from kde4. They're not really pretty but they're OK to
demonstrate the new features.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-12 14:24:50 +02:00
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