Commit Graph

144 Commits

Author SHA1 Message Date
Julien Danjou 0feb7de68e wibox: merge statusbars and titlebars Lua objects
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 14:34:43 +02:00
Julien Danjou 34fe130307 wibox: merge statusbar and titlebar types
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 11:11:56 +02:00
Julien Danjou 6ac0c4130c image: merge draw_image_t and image_t
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 11:11:55 +02:00
Julien Danjou 856192fa99 client: merge icon_path and netwm icon
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 11:11:55 +02:00
Julien Danjou 2fad185fcf ewmh: store netwm icon as draw_image_t
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 11:11:55 +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 e0d3da455b client: split minimized out of hidden
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 11:11:55 +02:00
Julien Danjou c66e28c7d9 tasklist: ignore some windows type
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 11:11:55 +02:00
Julien Danjou cfa9de3126 client: remove useless skip attribute
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
Radosław Szkodziński ad9c8cfd16 tasklist: add support for backward ordering - tasklist.invert
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 11:11:53 +02:00
Julien Danjou 1fbe4f0d5e ewmh: store NET_WM icon
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-08-11 23:10:02 +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 9f503e5a13 lua: rename luaA_function to luaA_ref
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-08-11 10:12:36 +02:00
Julien Danjou 81ae462a70 focus: remove focus history
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-31 17:30:01 +02:00
Julien Danjou 3db9f29453 appicon: new widget, used in titlebar
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-29 16:51:21 +02:00
Julien Danjou bf209f87bb ewmh: introduce and use netwm_icon_delete()
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-29 16:44:57 +02:00
Julien Danjou c4a01031c4 tasklist: add tags as cache element (FS#227)
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-29 12:05:27 +02:00
Julien Danjou 4ba2e22bae widget: add detach callbacks
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-29 11:50:40 +02:00
Julien Danjou 84ff146083 ta{g,sk}list: check dofunction return value
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-29 11:03:57 +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
Julien Danjou 09fd61fdfa tasklist: use label to determine which objects are drawn
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-28 15:57:17 +02:00
Julien Danjou 1a539712d1 tasklist: use common markup parsing
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-10 17:11:37 +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 36fd44d1a0 draw: add char len as arg of xcolor_init()
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-10 15:30:16 +02:00
Julien Danjou ad58260243 tasklist: use len and set it to 0 if no text
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-10 11:02:11 +02:00
Julien Danjou f28b4c07b2 tasklist: stop using client markup
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-10 11:02:11 +02:00
Julien Danjou 3f46ec2152 tasklist: use a callback for label
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-09 12:12:52 +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 5bb431fc4a widgets: don't tokenize twice
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-01 15:27:41 +02:00
Julien Danjou 35e948f53b draw: xcolor_t store color name
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-28 13:30:17 +02:00
Julien Danjou e9b6c33be3 tasklist: bug fix in show
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-27 22:21:10 +02:00
Julien Danjou c4cc8da645 tasklist: use newindex API
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-27 22:15:54 +02:00
Julien Danjou 4bf6d2df62 widgets: add documentation support
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-26 23:32:33 +02:00
Pierre Habouzit cde80ab49a Move CLEANMASK to xutil.h, remove useless #Includes
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
2008-06-26 22:47:56 +02:00
Michael Gehring f56f34d715 widgets: remove unnecessary #includes 2008-06-26 19:33:43 +02:00
Julien Danjou c9311efd5b widgets: s/lstack/luastack/
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-26 17:13:02 +02:00
Julien Danjou 094d0ebc50 widget: new widget index method
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-26 16:35:07 +02:00
Julien Danjou 425c8ea635 util: tokenize a_strtobool() 2008-06-23 18:06:00 +02:00
Julien Danjou 446df09acc cosmetic
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-23 14:14:47 +02:00
Julien Danjou cd21e6665b tasklist: tokenize
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-23 14:12: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 b4b381e947 Finish markup parsing rewrite to avoid mallocs.
For that matter, use elements as a filter for elements we care about, and
let the hook implement whatever it needs without duplicating everything.

The resulting algorithm is still O(n²) where n is the number of filtered
elements (3 at most right now), which isn't bad if we don't need to get
too many elements, but at least it's not quadratic in the number of
attributes anymore.

Speedup improvements could be done using gperf btw.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
2008-06-22 17:45:45 +02:00
Pierre Habouzit 943e2035fa Rework the markup_parser_* allocation API.
We have a stack, don't be ashamed to use it.

Instead of:

    foo_t *foo;

    foo = foo_new();
    /* work with foo */
    foo_delete(&foo);

It's way better to:

    foo_t foo;

    foo_init(&foo);
    /* work with &foo */
    foo_wipe(&foo);

Remember: more mallocs == more fragmentation.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
2008-06-22 16:17:12 +02:00
Pierre Habouzit 5c601dfd19 Use extensible buffers in markup parsing.
This should avoid quite a few malloc calls.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
2008-06-22 15:12:42 +02:00
Julien Danjou 92f369e3aa lua: userdata_new is now macro
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-18 18:31:35 +02:00
Julien Danjou 8753a54c65 ewmh: s/NetWMIcon/netwm_icon_t/
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-18 09:29:57 +02:00
Julien Danjou 64c4202519 draw: remove draw_image_from_file()
This should speed up tasklist image drawing.

Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-17 09:21:26 +02:00
Julien Danjou f5314dbc9e widgets: add destructors functions
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-14 22:56:05 +02:00
Julien Danjou 1049393840 Revert "Replace tags by workspaces"
This reverts commit 00f966ea04.

Revert "[focus] Fix bogus arguments"
This reverts commit 816b5d16bc.

Revert "[mouse] Fix bug with floating"
This reverts commit 89daa72790.

Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-09 21:56:03 +02:00