Commit Graph

104 Commits

Author SHA1 Message Date
Julien Danjou 1cc50b8a29 luaobject: remove useless custom function
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 15:30:46 +02:00
Julien Danjou ada6056c89 color: do not take pointer to push
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-17 17:46:35 +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 8a0f2aca28 wibox: move set window cursor code to window.c
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-07 11:19:10 +02:00
Julien Danjou 6cecd54f5d wibox: remove move() and resize()
We always use moveresize().

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-04 12:03:26 +02:00
Julien Danjou 047d04d438 luaobject: import __tostring as object meta function
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-07-29 16:09:14 +02:00
Julien Danjou c1d99f0960 luaobject: emit signal on new object
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-07-29 15:48:18 +02:00
Julien Danjou dea2b6303a luaobject: import signals meta methods in objects
Signed-off-by: Julien Danjou <julien@danjou.info>

Conflicts:
2009-07-29 15:48:18 +02:00
Julien Danjou c9caededca wibox: fix geometry computing in regards to border width
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-07-29 11:04:59 +02:00
Julien Danjou 15b1b2d7c4 wibox: remove internal geometry
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-07-28 17:18:41 +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 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 a77a1b7b64 Add a lua api for setting a wibox' shape
When the SHAPE extension is not available, this code prints
a harmless warn() on stderr.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-07-27 14:23:59 +02:00
Brian Gianforcaro 404ec8eb24 Fix doxygen generation warnings.
Signed-off-by: Brian Gianforcaro <b.gianfo@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-07-27 11:18:43 +02:00
Julien Danjou 2ca7149501 wibox: rebuild table at every draw
This will be necessary for using the new Lua layout system.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-07-07 14:42:37 +02:00
Julien Danjou a8115bd45e luaobject: ref take index number as argument
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-16 17:15:20 +02:00
Julien Danjou c95ba76d2f luaobject: use object header and standard gc everywhere
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-16 16:26:45 +02:00
Julien Danjou 25b3e718d1 wibox: do not set need_arrange on wibox detach
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-10 11:41:58 +02:00
Uli Schlachter a264acb1f0 Also track opacity for unattached wibox
Before this, setting w.opacity of a wibox that was not attached to some screen
had no effect, now this is cached and applied when the wibox is attached to
some screen.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2009-06-05 14:33:02 +02:00
Uli Schlachter 6b5e5f352c Use the new simplewindow functions for managing a wibox' opacity
Signed-off-by: Uli Schlachter <psychon@znc.in>
2009-06-05 14:32:00 +02:00
Uli Schlachter 8d30ef7d43 Add a border_color parameter to simplewindow_init()
All callers immediately called simplewindow_border_color_set() anyway.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2009-06-05 14:31:15 +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 0c564079b5 wibox: add property hook on screen and visible changes
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-04 17:51:07 +02:00
Julien Danjou fba4accc14 Revert "client: handle struts (a lot) better"
This reverts commit 264a81f3fb.

Conflicts:

	client.c
	client.h
	lib/awful/mouse.lua.in
	screen.c
	structs.h
	wibox.c
2009-05-25 15:17:57 +02:00
Julien Danjou 43902aed69 luaa: fix memory leak in __gc
We need to wipe the ref_array.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-05-08 09:53:20 +02:00
Julien Danjou fd40431e29 wibox: add missing documentation on objects
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-05-07 15:03:45 +02:00
qsd e0c56d36e6 wibox: fix Left and Right wibox position computing (FS#512)
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-27 21:49:24 +02:00
Julien Danjou 4a34693bfb screen: remove index field
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-18 17:51:31 +02:00
Uli Schlachter 99b521b2c7 Rename luaA_pushcolor() to luaA_pushxcolor()
Signed-off-by: Uli Schlachter <psychon@znc.in>
2009-04-18 14:02:21 +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 9b61434f7e wibox: fix memory leak with cursor
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-13 12:40:33 +02:00
Julien Danjou a08794d7cd client, wibox: unref image on garbage collection
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-13 12:36:23 +02:00
Uli Schlachter bee45f1b4a Remove the code for floating wiboxes from wibox_position_update_non_floating()
The last commit moved the handling of floating wiboxes into its own function,
so the checks for floating wiboxes in here can be removed.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2009-04-12 21:11:46 +02:00
Uli Schlachter b4b08fd926 Split wibox_position_update() up
Floating wiboxes are much easier to handle, so they deserve their own
function.
This function, wibox_position_update_floating() does exactly the same things
wibox_position_update() did before. No behaviour change involved.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2009-04-12 21:08:59 +02:00
Uli Schlachter 62bfc2e9ac Some minor code optimization
It's just easier to read this way. :)

Signed-off-by: Uli Schlachter <psychon@znc.in>
2009-04-12 21:04:05 +02:00
Uli Schlachter 34554d8958 Only arrange screen for non-floating wiboxes
Floating wiboxes dont influence client's position and thus no arrange
is necessary.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2009-04-12 21:02:21 +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 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
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
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
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