Commit Graph

697 Commits

Author SHA1 Message Date
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
Julien Danjou efc3cc4c15 xutil: fix proto
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-15 14:43:59 +02:00
Julien Danjou 5db54fc731 xutil: fix proto of key mask translator
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-15 14:43:59 +02:00
Julien Danjou f168bbdfa4 key: add support for modifier mask Any
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-15 14:43:58 +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 d5596c06ed xutil: remove useless error functions
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 e4f7e99c3f client: add support for _NET_STARTUP_ID
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-14 12:47:10 +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 a1480ef7d8 luaobject: import
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 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