Commit Graph

314 Commits

Author SHA1 Message Date
Julien Danjou a916f2cd55 image: port to new class system
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 13efd8a199 wibox: get rid of simple window
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-07-28 16:11:41 +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 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 0ca7a0fd71 widget: use orientation rather than position
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-05-10 16:17:39 +02:00
Julien Danjou 308ef7de5d mouse: split button out
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-26 10:46:09 +02:00
Julien Danjou dc29720ef7 Replace lua_newtable() with lua_createtable()
Lua can preallocate space in table for array or non-array elements type.
This should improve performance when setting table, so when we can we
use lua_createtable() since this is just a gain.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-25 15:04:27 +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
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 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 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 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
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
Alex Cornejo 106e6ed5ab Styling inconsistencies
Cheers,

Alex

From b5816ec55073507d4527ad3a77eae1878adb30d3 Mon Sep 17 00:00:00 2001
From: Alex Cornejo <acornejo@gmail.com>
Date: Sun, 29 Mar 2009 14:24:27 -0400
Subject: [PATCH] Fixed some styling issues.

Noticed in the latest pull that a commit introduced a lot of styling
inconsistencies, decided to remove those and others found by a simple
grep.

Signed-off-by: Alex Cornejo <acornejo@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-03-30 12:53:12 +02:00
Julien Danjou a4373e65cf mouse: stop using otable
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-03-14 13:34:38 +01:00
Gregor Best 0235d995c2 mouse: add object_under_pointer
Signed-off-by: Gregor Best <farhaven@googlemail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-14 10:28:23 +01:00
Julien Danjou 2037a053a9 layout: move layout code to Lua
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-14 10:28:21 +01:00
Julien Danjou 53a830aea1 mouse: move resize code to awful.mouse
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-12 16:51:41 +01:00
Julien Danjou ee475580ef mouse: make luaA_button_userdata_new static
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-12 16:51:41 +01:00
Julien Danjou 955fcd6a5a mouse: remove infobox
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-12 16:51:41 +01:00
Julien Danjou 49bb7e87b4 mouse: remove client_move, move it to awful
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-12 16:51:41 +01:00
Julien Danjou ab804f689d mouse: add client_under_pointer() method
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-12 16:51:41 +01:00
Julien Danjou 0e972d4845 mousegrabber: import
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-12 16:51:41 +01:00
Julien Danjou ffca477d5d mouse: export mouse_query_pointer()
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-12 16:51:41 +01:00
Julien Danjou 3cf79072cd xcursor: add new cursor infra
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-12 16:51:41 +01:00
Julien Danjou 506e453a2f remove deprecated functions
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-12 16:51:40 +01:00
Julien Danjou b0090950a0 Revert "lua: do not use otable where table are enough"
This reverts commit a220d46850.
2008-12-04 16:55:40 +01:00
Julien Danjou a220d46850 lua: do not use otable where table are enough
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-04 13:29:00 +01:00
Julien Danjou d1db6903fa luaa: check that function is not NIL before pushing and calling
Otherwise we may push unused elements because dofunction() checked
_after_ if the function was nil, or not.

Signed-off-by: Julien Danjou <julien@danjou.info>
2008-11-20 17:48:23 +01:00
Julien Danjou 3ebcc1aa5a luaa: add more deprecation information
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-11-14 12:12:01 +01:00
Julien Danjou 79468cf3a1 client: fix fixed size detection and resize blocking
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-11-10 12:10:06 +01:00
Julien Danjou a5cb98162d textbox: add ellipsize and wrap mode support
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-11-06 17:04:23 +01:00
Julien Danjou 207df8e2b0 luaa: change deprecate() with more useful info
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-11-05 11:54:08 +01:00
Julien Danjou 096170fa72 mouse: add compatibility code for mouse()
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-11-05 11:54:08 +01:00
Julien Danjou 8e66a543bc draw: remove phys_screen from font handling
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-11-04 17:50:10 +01:00
Julien Danjou d444cc8d59 mouse: drop alpha channel in infobox
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-11-03 15:52:32 +01:00
Julien Danjou 85c7bf07c9 luaa: merge tostring() with DO_LUA_NEW
Also use the same format as standard Lua for tostring output.

Signed-off-by: Julien Danjou <julien@danjou.info>
2008-10-26 16:15:49 +01:00
Julien Danjou 737a70f60c remove a bunch of useless #include-s
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-10-24 20:57:29 +02:00
Julien Danjou 4f1273794b mouse: fix button delete
We need to unref Lua functions.

Signed-off-by: Julien Danjou <julien@danjou.info>
2008-10-24 18:53:47 +02:00
Julien Danjou 0b5a681171 widget: return self for buttons
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-10-24 17:48:50 +02:00
Julien Danjou a5640330d9 lua: check for ref value before getting them
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-10-21 10:35:23 +02:00
Julien Danjou ba66ae8035 hooks: add clients hook
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-10-20 15:04:56 +02:00
Julien Danjou c19965cfff mouse: add index on button, permit object cloning
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-10-19 18:51:21 +02:00
Julien Danjou 031726c9b9 xutil: use token for keys
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-10-01 11:09:57 +02:00
Julien Danjou 5709435392 wibox: rework, merge titlebar
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-26 15:00:42 +02:00
Julien Danjou 2e17f8a662 swindow: do not store phys_screen; store border color
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 11:11:56 +02:00
Julien Danjou fcc93e5f88 draw: merge draw context into swindow
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 11:11:56 +02:00
Julien Danjou 44ef511aed screen: store statusbars as array
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 11:11:56 +02:00
Julien Danjou 4193e81fa8 screen: merge with xscreen, remove screens_info
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 11:11:56 +02:00
Julien Danjou 6a5ad6af9b common: move draw, xscreen and swindow out
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 11:11:55 +02:00
Julien Danjou 004a152550 mouse: redraw statusbar rt on screen move
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 11:11:55 +02:00
Julien Danjou bf451445c3 client: stop default tagging of sticky windows
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 11:11:55 +02:00
Julien Danjou b4d89eec6c screen: move screen_getbycoord()
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 11:11:54 +02:00
Julien Danjou fcde8d229b ewmh: add support for _NET_WM_STRUT_PARTIAL
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 11:11:54 +02:00
Julien Danjou 427679b0fa client: use a type attribute for NET WM window type
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 11:11:54 +02:00
Julien Danjou c1d7140f87 mouse: cosmetic
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 11:11:54 +02:00
Julien Danjou b2bb33b9d8 titlebar: remove/add now handle border
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 11:11:54 +02:00
Julien Danjou 8b5fe6f30f mouse: simplify button push
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 11:11:54 +02:00
Julien Danjou abb497fa56 client: rework all stacking stuff
- Stacking is now per attribute
- Fullscreen does not imply isfloating

Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 11:11:54 +02:00
Julien Danjou 3b895d84ed mouse: rework mouse buttons API, support release events
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 11:11:53 +02:00
Julien Danjou be52f5b047 update to new xcb-event
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-16 15:36:44 +02:00
Julien Danjou 87a89b6aa1 use xcb_flush; move refresh stuff in common function
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-08-26 19:35:37 +02:00
Julien Danjou e753be131d magnifier: simplify formula
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-08-23 08:40:07 +02:00
Julien Danjou d4273f4e96 magnifier: implements mwfact as surface factor
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-08-22 22:09:51 +02:00
Julien Danjou af49f6f8f1 mouse: fix coords() set
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-08-20 16:25:45 +02:00
Julien Danjou f4872715ce mouse: coords is a function now
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-08-20 12:10:22 +02:00
Julien Danjou 70d89c4452 mouse: fix client snapping
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-08-18 11:04:50 +02:00
Julien Danjou f5717587ec mouse: snap also on scren without titlebars
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-08-18 10:56:40 +02:00
Julien Danjou df79115dd1 zaphod: restore support
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-08-15 00:31:32 +02:00
Arnaud Fontaine b655f6348c xutil: rename xutil functions according to the rest of code. 2008-08-11 18:05:35 +02:00
Julien Danjou be2bfdcfc5 screen: introduce screen objects
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-08-11 17:14:02 +02:00
Julien Danjou 9e9b7c1bf3 mouse: refresh titlebars on the fly
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-08-08 17:38:51 +02:00
Julien Danjou e9adbff429 mouse: fix memory leak on resize
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-08-06 16:22:48 +02:00
Julien Danjou 6bbbf03c95 mouse: factorize xcb_aux_sync calls
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-08-06 14:11:33 +02:00
Julien Danjou 063bf2083d titlebar: use need_update system (like statusbar, …)
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-31 14:11:07 +02:00
Julien Danjou 80b79717ba various documentation update for _index()
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-28 16:03:38 +02:00
Kanru Chen 700ace5197 length of static string s should be sizeof(s)-1
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-22 10:30:53 +02:00
Julien Danjou 5fc500a861 draw: draw_text takes len as arg
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-10 15:35:19 +02:00
Julien Danjou 750040be68 draw: text extents now gets len as arg
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-10 15:06:09 +02:00
Julien Danjou 015f529928 documentation update and disallow tag name change
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-10 11:02:10 +02:00
Pierre Habouzit 924078c898 Streamline xcolor_t.
Do not have a ->name char * field, but a char[32] instead.  This isn't a
big problem, the longest color in /etc/X11/rgb.txt is 23 chars long, and
if it becomes a problem one day, one could just strip the name and
generate an hexadecimal representation on the fly instead. But allocating
the name is asking for a lot of trouble.

Since we do not allocate anything anymore, just don't allocate anything
anymore at all, it avoids the mess of xcolor_copy/_wipe and fixes a lot of
sleeping bugs (p_dup were used e.g., which is wrong).

Pass xcolor_t *, xcolor_t becomes too big to be passed by value. Add
consts at some places.

xcolor_new allocates nothing, hence is renamed xcolor_init, has xcolor_t
as a first argument (OO-style, this is self), and doesn't touch the
structure at all if it returns false, which allow us to skip a lot of
intermediates values.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-02 10:36:46 +02:00
Julien Danjou 2c5333e9a3 mouse: merge screen_get() into index
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-02 09:14:17 +02:00
Julien Danjou ab72f6f02b mouse: add newindex, merge coords
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-02 09:11:03 +02:00
Julien Danjou 0cbf293e13 mouse: add __index
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-02 09:00:59 +02:00
Julien Danjou a4e12b1ce0 mouse: fix args for mouse.coords_set()
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-01 09:27:34 +02:00
Julien Danjou 45b0a2df80 lua: replace .new() by __call meth
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-30 14:11:54 +02:00
Julien Danjou 013b2afe62 remove useless #include
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-26 18:10:45 +02:00
Julien Danjou db88877587 lua: split getopt_string/getopt_lstring; fix mouse corner
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-25 17:33:05 +02:00
Julien Danjou 6ec76c3b97 client: honor size hints is now by client
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-25 15:42:07 +02:00
Michael Gehring cb848e6b1a mouse: move/resize return if grabbing the pointer fails. 2008-06-24 08:58:04 +02:00
Julien Danjou 100f62c4b9 mouse: don't pass parser data, useless
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-23 16:15:24 +02:00
Pierre Habouzit 3116c0d381 Add draw_parser_data_{init,wipe}.
Use it everywhere needed instead of wrong p_clear's, this fixes memory
leaks.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
2008-06-23 15:23:49 +02:00
Julien Danjou ab5119732d use more tokenizer, with len
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-23 14:01:33 +02:00
Julien Danjou 723299ff5f mouse: fix uninit var
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-23 13:20:01 +02:00
Julien Danjou 7aab504350 draw: store parser_data made by extents call
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-23 13:09:42 +02:00
Pierre Habouzit f423719bd6 use gperf
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
2008-06-23 07:41:22 +02:00