Commit Graph

709 Commits

Author SHA1 Message Date
Uli Schlachter ab4c151ed8 Add signals before using them
This commit makes it an error if an unknown signal is connected, disconnected or
emitted. All signals have to be added before they can be used.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-25 23:00:36 +02:00
Uli Schlachter 948f960b7e Also rename the signal_* C function
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-25 20:48:42 +02:00
Julien Danjou 6d332f07a0 lua{class,object}: rename signals functions
I knew this was wrong at the beginning, f*ck.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-08-25 20:28:20 +02:00
Julien Danjou f523b37e1d lua{class,object}: {add,remove}_signal() take lua_CFunction as arg
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-08-25 20:14:55 +02:00
Julien Danjou 3fbb5f1535 luaobject: emit signals on class too
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-08-18 10:41:52 +02:00
Uli Schlachter 5d35771673 Save the screen in globalconf.
There can only be on xcb_screen_t now, so we can save it in globalconf.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-16 14:10:58 +02:00
Uli Schlachter 32d9a5b2ab Remove support for zaphod mode
This makes awesome support only a single X11 protocol screen. If you are still
using zaphod mode, you can run multiple instances of awesome on the single
screens, e.g.:

DISPLAY=:1.0 awesome & DISPLAY=:1.1 awesome &

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-16 13:47:40 +02:00
Uli Schlachter 46048332b0 Don't fail if execinfo is not available
Previously, cmake aborted when execinfo was not found. With this commit the
backtrace code is just disabled when execinfo is not available.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-12 20:14:56 +02:00
Uli Schlachter 544fa215ea Add "focusable" property to client objects
If this property is true, setting "client.focus" to this client might have some
effect. If it is false, setting "client.focus" will be ignored completely.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-12 13:08:55 +02:00
Gregor Best 5d0a81c8bf fix some deprecated atom constants
Signed-off-by: Gregor Best <gbe@ring0.de>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-08 21:43:23 +02:00
Uli Schlachter 4545c23658 Brown paper bag commit
I removed the function, but forgot to remove the prototype. Whoops!

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-08 18:06:47 +02:00
Uli Schlachter 58bb601658 Stop using most of libxcb-event
Upstream removed most of the code from libxcb-event and there is no
event-related stuff left in this library. We now no longer use any of the parts
that were removed.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-08 17:35:48 +02:00
Julien Danjou f7746a198c luaclass: take care of inheritance garbage collection
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-28 13:27:49 +02:00
Julien Danjou fccc451f89 luaclass: add inheritance support
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-28 13:27:04 +02:00
Julien Danjou c08b90345f screen: export RandR information
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-28 13:26:20 +02:00
Julien Danjou 9c020877dd ewmh: remove _NET_WORKAREA support (FS#732)
This fixes problem with Qt 4.6.
Our implementation cannot be standard, and was not standard, so just
stop using this EWMH crap.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-02-18 10:04:01 +01:00
Pierre Allegraud d75e41286a fix build on NetBSD (FS#706)
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-12-21 08:48:00 +01:00
Julien Danjou da9664f812 util: mark strhash with nonnull
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-11-09 20:43:18 +01:00
Julien Danjou d8c0f516ba luaclass: implement object checking
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-10-27 12:16:30 +01:00
Julien Danjou 48565f10bb tokenenize: remove useless tokens
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-10-20 20:42:05 +02:00
Julien Danjou 371ee3e8cc titlebar: remove
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-10-20 20:42:05 +02:00
Julien Danjou be09012c08 graph, progressbar: remove
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-10-20 20:42:04 +02:00
Julien Danjou 7fae0db5ea tokenize: remove useless tokens
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-09-21 12:29:42 +02:00
Julien Danjou af44734bd4 luaclass: add luaA_checkudataornil
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-09-04 16:24:14 +02:00
Uli Schlachter 2b75950a8c Add some missing class type checks
Some functions didn't check the class of objects they were passed but just
casted them to the type they expected. This lead to code like e.g. the following
to crash awesome:

  c.titlebar = c

This adds a new function luaA_object_ref_class() which works like
luaA_object_ref(), but which also checks the class of the object.

Additionally, this function is now used in all necessary places.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-09-04 13:58:31 +02:00
Brian Gianforcaro 3145e3145e Grammar/spelling corrections in comments and docs.
Signed-off-by: Brian Gianforcaro <b.gianfo@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-31 10:39:36 +02:00
Julien Danjou 3739aabda1 lualib: allow to replace error handling function
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-27 17:53:51 +02:00
Julien Danjou 26c446fa82 textbox: add valign
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-25 17:56:48 +02:00
Julien Danjou dfe137fab9 xutil: fix possible overflow
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-24 12:04:04 +02:00
Julien Danjou 8f1ccca881 xutil: remove xutil_text_prop_get
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-24 10:35:13 +02:00
Julien Danjou e56ef78d92 xutil: get_text_property_from_reply return strdup
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-24 10:25:43 +02:00
Julien Danjou 0649e079b5 xutil: add xutil_get_text_property_from_reply
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-22 15:04:56 +02:00
Julien Danjou 8da6a20f27 luaobject: check that object is userdata
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-22 13:20:55 +02:00
Julien Danjou 41580c91d8 signal: fix memory leak, wipe signal_t
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 23:11:44 +02:00
Julien Danjou 4d0a025f51 luaclass: add handling of {new,}index of missing properties (FS#584)
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 15:30:48 +02:00
Julien Danjou c180904d77 luaobject: change function push method in signal emit
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 15:30:48 +02:00
Julien Danjou f111d0cab1 luaclass: use signal_object_emit
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 15:30:48 +02:00
Julien Danjou 2a252cd4da luaobject: add signal_object_emit
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 15:30:48 +02:00
Julien Danjou a02d026f77 client: port to new object system
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 15:30:47 +02:00
Julien Danjou 84839d456d wibox: port to new object system
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 15:30:47 +02:00
Julien Danjou 376c0daaaf luaobject: add export property macro
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 15:30:47 +02:00
Julien Danjou f3e12dbe52 screen: add .index property
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 15:30:47 +02:00
Julien Danjou dc61d258f0 luaclass: optimize type handling
We use lua_class_t pointer as key in the registry to store metatable we
will compare.
lauxlib uses a string, which sucks, because it forces to do a
pushliteral() each time you want to get a metatable from the registry,
which is slower.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 15:30:47 +02:00
Julien Danjou 5dbae0e34f luaobject: remove prefix##_push_item()
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 15:30:47 +02:00
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 6cfaafbab3 luaclass: remove useless property name
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-20 16:46:33 +02:00
Julien Danjou 07ac920b1c timer: export started status to Lua
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-17 21:55:43 +02:00
Julien Danjou 432f4229be timer: import
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-17 17:49:06 +02:00
Julien Danjou 45702de158 luaclass: add support for new()
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-17 17:45:17 +02:00
Julien Danjou 1300b16c1e luaclass: add generic {new,}index meta methods
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-17 17:45:14 +02:00
Julien Danjou 537506a0c1 luaclass: add property array handling in classes
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-17 17:45:10 +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 0cc5d85111 lualib: fix error_func_pos computing
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-14 14:36:56 +02:00
Julien Danjou a2623225c1 lualib: fix error function removal
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-12 18:57:56 +02:00
Julien Danjou d531519a9f lualib: print backtrace on function error
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-11 17:21:14 +02:00
Julien Danjou 176fa70916 draw: remove useless AlignFixed
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-04 14:35:20 +02:00
Julien Danjou ec5ae3dfb8 imagebox: remove valign
This is not used anymore in rendering.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-04 14:31:21 +02:00
Julien Danjou 1ab20e289e build: do not use common as include dir
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-03 17:42:51 +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 a8f4a59efd lualib: import stack dumping function
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-07-29 16:09:14 +02:00
Julien Danjou 284338532b luaobject: add type recognition
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-07-29 15:48:19 +02:00
Julien Danjou 706d545076 luaclass: register class in an array
That should permit class identification.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-07-29 15:48:19 +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 4003ef726f luaclass: import class system
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 7ecce446ad luaobject: generate Lua API function for add, remove and emit signal
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-07-29 15:48:18 +02:00
Julien Danjou eed9864ab0 luaobject: add signals
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-07-29 15:48:18 +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 a1b113901c luaobject: change global refering method
We now store elements in registry:
registry.pointer = userdata

And count references.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-07-28 10:40:51 +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
Julien Danjou 88ef17ce94 buffer: remove useless assignation
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-18 10:18:55 +02:00
Perrin "kAworu" Alexandre 319f2d55bc removed WidgetList, name_func_link_t and related function
use tokenize.gperf instead.

Signed-off-by: Perrin "kAworu" Alexandre <kaworu(a)kaworu,ch>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-17 16:22:42 +02:00
Julien Danjou 654bfae6f7 util: add fieldsizeof and fieldtypeof macros
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-17 15:56:04 +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 f8d549139f array: add bisect-style insert and lookup
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-16 17:10:55 +02:00
Julien Danjou 6b24af7238 luaobject: define an common object and a standard gc 2009-06-16 16:17:31 +02:00
Julien Danjou a04ad58004 tokenize: remove useless floating token
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-15 16:26:11 +02:00
Uli Schlachter 42865a54ef Sort the tokens in tokenize.gperf alphabetically
This is done with vim:
ggVG:sort i

(Yes, this is a case-insensitive sort)

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-15 16:24:08 +02:00
Julien Danjou be238512cc awesome: dump backtrace on SEGV/ABRT
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-05 15:00:37 +02:00
Julien Danjou c00aa8fd5e util: import a_strhash()
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-05 14:44:38 +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 1ef09fa8e6 luaa: add font_height in awesome module
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-04 17:51:17 +02:00
Ciaran McCreesh 933dc50db9 Fix build with assertions enabled.
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-05-04 08:56:14 +02:00
Julien Danjou c378343a64 key: add .keysym to return keysym name
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-30 00:11:38 +02:00
Mariusz Ceier 7010ffd164 Fix foreach macro
Fixes support of break/continue statement

Signed-off-by: Mariusz Ceier <mceier@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-29 21:13:37 +02:00
Julien Danjou 505245a5ff array: fix foreach statement
We continously check for len, and build var upon each iteration so we
are sure we never go away in memory.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-29 19:54:07 +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 3eb14d7c76 luaa: move version and release to awesome module
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-28 16:21:50 +02:00
Julien Danjou 56225a39fe array: check that we are still in the tab
If the array is modified while we are running the foreach() loop, the
tab of the array may be reallocated, so var can be totally out of the
memory: check for that.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-28 08:34:13 +02:00
Julien Danjou 324387bfed util: remove useless asprintf macro
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-26 20:22:44 +02:00
Julien Danjou 6ff72afd90 buffer: add buffer_addsl() for literal strings
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-26 20:21:54 +02:00
Julien Danjou cbcbb68f7e xutil: remove useless conversion function
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-26 12:34:13 +02:00
Julien Danjou c8b758ac48 key: add __index metamethod
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-25 16:00:08 +02:00
Julien Danjou 6ee3e9d7c0 xutil: add xutil_key_mask_tostr()
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-25 15:59:22 +02:00
Julien Danjou 467737250c dbus: allow usage of the system bus
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-18 16:07:31 +02:00
Julien Danjou 24b82772d2 atoms: drop useless strlen usage
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-18 13:37:01 +02:00
Julien Danjou 9d48852fed util: remove fd_set_close_on_exec()
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-18 11:39:06 +02:00
Julien Danjou a6f60c8e41 slist: remove
We do not use linked list anymore.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-17 23:27:16 +02:00
Julien Danjou f473a107b0 cleanup #includes
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-17 16:52:25 +02:00