Commit Graph

26 Commits

Author SHA1 Message Date
Ignas Anikevicius (gns_ank) e4fa6effe2 Docs: Fix headers for the wibox module
Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
2015-02-28 23:14:11 +01:00
Uli Schlachter e4f352f390 wbox: Make :find_widgets() easily accessible
Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-08-20 11:26:09 +02:00
Uli Schlachter 62e2dee4ba Add awesome.register_xproperty (FS#1212)
This commits adds awesome.register_xproperty(). This allows lua code to register
arbitrary X11 properties with awesome which will then watch these properties.
Whenever such a property is changed on a client or drawin, we will emit the
xproperty::name signal.

This also adds window:get_xproperty(name) and window:set_xproperty(name, value)
which allows to mess with properties.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-03-07 16:17:40 +01:00
Uli Schlachter 90f7f55348 wibox: Make the functions a little more object-y
This replaces lots of function foo.bar(this, ...) with function foo:bar(...).
There should be no other changes in this commit.

The point is to make it easier for api documentation tools to figure out that
these are methods on objects.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-11-18 20:44:03 +01:00
Uli Schlachter 77fedaeee8 Remove unused signal property::widgets
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-10-31 22:24:23 +01:00
Uli Schlachter fa86fbeb52 lib/wibox: Make signals from drawables available
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-10-31 22:12:30 +01:00
Uli Schlachter 41ef107b88 Add titlebars on the C side
This commit makes it possible to add titlebars to a client. These titlebars are
drawables.

The drawin's input handling is moved to the drawable. This allows it to use the
same code for drawin and titlebar input handling, although there are lots of
differences between the two on the C side.

On the lua side, a new wibox.drawable module is created which handles all the
drawable-specific magic and which can also be used for titlebars.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-10-14 17:30:59 +02:00
Uli Schlachter f0512eeaab Introduce drawables
A drawable is something that you can draw to, just like a drawin. However, a
drawable isn't necessarily its own windows. This will later on be used to
implement titlebars where the titlebars are drawables.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-10-14 17:30:54 +02:00
Arvydas Sidorenko 3f5eaf9c1b Ported wibox to lua 5.2
Tested with lua 5.1: all good

Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
2012-06-16 17:37:30 +02:00
Uli Schlachter 4f30dfd198 Switch from oocairo to lgi.cairo
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-05-27 19:20:34 +02:00
Anurag Priyam 9dfe4fe84b wibox.set_bg: remove historical cruft
Should ideally have been removed in commit 'drawin: Remove bg_color property'.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-05-06 18:53:04 +02:00
Anurag Priyam ceb6eb311d wibox: assume a default background and foreground color if none passed
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-05-06 18:53:04 +02:00
Uli Schlachter 5c7a3501d0 wibox: Add pseudo-transparency support
If you now set a wibox' background to e.g. "#00000080", the wibox will do fake
transparency and draw the wallpaper as its background.

This should cover 90% of uses of wibox transparency. For the remaining 10% I'll
wait for bug reports. :-)

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-04-07 21:54:51 +02:00
Uli Schlachter efee293dd2 wibox: Allow tables as color specification
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-02-17 17:50:31 +01:00
Uli Schlachter 20cafb4851 drawin: Remove bg_color property
The default background color (None) means that the server will leave the
window's content untouched when an exposure happens. This should get rid of all
cases of "flashing window".

The real background will later be drawn while awesome is handling the expose
event.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-12-23 16:54:55 +01:00
Gregor Best c2ea920ca0 remove encoding=utf-8 from modelines
This option is no longer valid in modelines, so it has been removed from
all modelines using the following shellscript:

    #!/bin/ksh

    git ls-tree -r HEAD | cut -f2 | while read f; do
        egrep -e '^(//|--) vim: .*encoding=' $f >/dev/null || continue
        sed -E -e '/^(\/\/|--) vim:/s/:encoding=utf-8//' $f > /tmp/foo
        mv /tmp/foo $f
    done

Signed-off-by: Gregor Best <gbe@ring0.de>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-09-11 17:34:09 +02:00
Uli Schlachter 8453d0cc4f awful.wibox: Fix for removal of screen property
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-03-27 16:35:43 +02:00
Uli Schlachter 3ec32306db (Try to) document the wibox constructor
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-12-14 21:07:04 +01:00
Uli Schlachter df116331a1 Improve wibox' API documentation
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-12-12 21:45:54 +01:00
Uli Schlachter 07bbe14d02 Wibox: Set the drawin's background color if possible
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-12-12 21:18:32 +01:00
Uli Schlachter 8882cf360a wibox: Fix mouse event handling
If you managed to press mouse button 4 exactly between two entries in the
taglist, the taglist would jump by two tags instead of just one. This is because
the mouse event was forwarded to both taglist items.

This happened because the calculation in wibox' find_widgets() was wrong. If you
have a widget at (1, 1) with a size of 1x1, then (1, 1) is the only point that
this widget covers. However, the math also included the pixels (2, 1), (1, 2)
and (2, 2) in the widget's extents. This is obviously wrong.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-30 19:56:07 +02:00
Uli Schlachter 1beb274944 Wibox: Use the "refresh" signal for redrawing
Previously, we used a timer with a timeout of 0 for redrawing the wibox. I had
the visual impression that the wibox was black for a moment. With strace I was
able to measure a latency of 10ms until the wibox was finally redrawn.

This now uses the "refresh" signal. With this, we get our latency down to
something like 0.15ms which sounds a lot better. :)

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-15 18:57:50 +02:00
Uli Schlachter 6b972ffde0 widgets: Add mouse::{enter,leave} signals
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 21:17:05 +02:00
Uli Schlachter 4af11b821c Whoops, fix wibox signals
emit_signal() already adds the object as the first argument, so we don't have to
add it ourselves.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 20:46:11 +02:00
Uli Schlachter 18799f32f8 Emit mouse::move signals when we get a motionnotify
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 20:44:22 +02:00
Uli Schlachter 2eae7e5cf4 Import lib/wibox/, a new widget system in lua
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 12:42:56 +02:00