awesome.git
10 days agoawful.tooltip: Set the bg color correctly (FS#1148) master
Uli Schlachter [Mon, 13 May 2013 17:27:19 +0000 (19:27 +0200)]
awful.tooltip: Set the bg color correctly (FS#1148)

Well, whoops. There is no .bg property on wiboxes for quite a while already, it
is now a :set_bg member function.

Signed-off-by: Uli Schlachter <psychon@znc.in>

6 weeks agoImplement window gravity in ConfigureRequests (FS#1137)
Uli Schlachter [Sun, 7 Apr 2013 09:57:40 +0000 (11:57 +0200)]
Implement window gravity in ConfigureRequests (FS#1137)

Previously, awesome didn't move windows when they sent a ConfigureRequest (and
it also shrunk them by the size of titlebars, before it forgot to add these).
This commit adds proper gravity support to ConfigureRequest handling.

This was tested with test-gravity from metacity (in src/wm-tester).

Signed-off-by: Uli Schlachter <psychon@znc.in>

7 weeks agochange codename v3.5.1
Uli Schlachter [Mon, 1 Apr 2013 11:44:46 +0000 (13:44 +0200)]
change codename

Signed-off-by: Uli Schlachter <psychon@znc.in>

7 weeks agoFix minor memory leak in mouse_query_pointer()
Uli Schlachter [Sun, 31 Mar 2013 16:15:25 +0000 (18:15 +0200)]
Fix minor memory leak in mouse_query_pointer()

Signed-off-by: Uli Schlachter <psychon@znc.in>

7 weeks agoSend correct position in ConfigureNotify events (FS#1030)
Uli Schlachter [Sun, 31 Mar 2013 16:07:49 +0000 (18:07 +0200)]
Send correct position in ConfigureNotify events (FS#1030)

This event should contain the position of the top-left corner of the client's
content area. Thus, we have to add the border width to the position.

Signed-off-by: Uli Schlachter <psychon@znc.in>

7 weeks agoRevert "Support more than 5 mouse buttons" (FS#1082)
Uli Schlachter [Fri, 29 Mar 2013 15:07:13 +0000 (16:07 +0100)]
Revert "Support more than 5 mouse buttons" (FS#1082)

This reverts commit bd8158495e059baa0e8ba525b813254451447f4a.

The idea was to track the current list of pressed and depressed mouse buttons,
because we get button events for more than 5 buttons, but can only query the
state of the first 5 buttons.

However, there are cases where we see button presses, but won't see the
corresponding release event. This is quite bad.

Signed-off-by: Uli Schlachter <psychon@znc.in>

8 weeks agonaughty: Don't interpret markup in titles
Ross Lagerwall [Tue, 26 Mar 2013 08:16:58 +0000 (08:16 +0000)]
naughty: Don't interpret markup in titles

Since only the body text of a notification may contain markup,
by combining the two together and calling set_markup(), the
title would also get interpreted as if it had markup.
This could be seen with:
$ notify-send "Title & text" "<i>body text</i>"

The unescaped & would get interpreted as broken markup and so
naughty would fall back to escaping everything which would make
the "<i>" tags be shown rather than interpreted.

So, the title must always be escaped so that it is not interpreted
as markup.

Signed-off-by: Ross Lagerwall <rosslagerwall@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>

8 weeks agoFix wibox.layout.flex:fit() (FS#1126)
Uli Schlachter [Sun, 24 Mar 2013 21:32:53 +0000 (22:32 +0100)]
Fix wibox.layout.flex:fit() (FS#1126)

The flex:fit() function was calling the fit() function of the widgets it
contained with too large values, trying to hand out more space than it had
available. This resulted in more space being requested than was available and
some weird layout issues resulted.

Signed-off-by: Uli Schlachter <psychon@znc.in>

2 months agoFix mod4+[1-9] in default rc.lua
Emmanuel Lepage Vallee [Fri, 22 Mar 2013 04:59:05 +0000 (00:59 -0400)]
Fix mod4+[1-9] in default rc.lua

The old code had flaws:
* If the tag chnaged screen, the code was unstable.
* If awful.tag.del was used, then it displayed an error
* If tags were added later, the keyboard shortcut were unavailable

2 months agoAdd support for "geometry" argument for mouse events and awful.button
Emmanuel Lepage Vallee [Fri, 22 Mar 2013 04:52:02 +0000 (00:52 -0400)]
Add support for "geometry" argument for mouse events and awful.button

2 months agoFix calculation of distance between clients
Jo De Boeck [Fri, 25 Jan 2013 09:47:11 +0000 (11:47 +0200)]
Fix calculation of distance between clients

This fixes move by direction

Signed-off-by: Uli Schlachter <psychon@znc.in>

2 months agoAllow to disable taglist icons.
Emmanuel Lepage Vallee [Sat, 5 Jan 2013 20:58:36 +0000 (15:58 -0500)]
Allow to disable taglist icons.

This is used if the user want to use a custom drawing method.

Signed-off-by: Uli Schlachter <psychon@znc.in>

2 months agoAdd ability to set background images for empty tag
Emmanuel Lepage Vallee [Fri, 4 Jan 2013 01:56:36 +0000 (20:56 -0500)]
Add ability to set background images for empty tag

Signed-off-by: Uli Schlachter <psychon@znc.in>

2 months agoAdd ability to disable tasklist icons and restore ability to set bg_images
Emmanuel Lepage Vallee [Fri, 4 Jan 2013 02:00:33 +0000 (21:00 -0500)]
Add ability to disable tasklist icons and restore ability to set bg_images

Signed-off-by: Uli Schlachter <psychon@znc.in>

2 months agoAdd external function for {tag,task,tab}list background image
Emmanuel Lepage Vallee [Fri, 4 Jan 2013 01:54:40 +0000 (20:54 -0500)]
Add external function for {tag,task,tab}list background image

Signed-off-by: Uli Schlachter <psychon@znc.in>

2 months agoawful.mouse: Follow C API changes
Uli Schlachter [Sun, 17 Mar 2013 21:18:48 +0000 (22:18 +0100)]
awful.mouse: Follow C API changes

Whoops. This was broken ages ago. Thanks to Elv13 for making me notice.

Signed-off-by: Uli Schlachter <psychon@znc.in>

2 months agoSpeed up the RGBA->BGRA conversion (FS#1112)
Poggles [Sun, 17 Mar 2013 13:07:00 +0000 (13:07 +0000)]
Speed up the RGBA->BGRA conversion (FS#1112)

Signed-off-by: Uli Schlachter <psychon@znc.in>

2 months agoawful.tag: Use sane tag index values (FS#1125)
Uli Schlachter [Sat, 16 Mar 2013 15:51:55 +0000 (16:51 +0100)]
awful.tag: Use sane tag index values (FS#1125)

Since commit d8a93dafa316d, tags have an "index" property which decides about
the order in which they are displayed in the taglist. If a tag doesn't have this
property set, the next call to awful.tag.gettags() will fix this and "invent" an
index for this new tag.

However, if multiple tags didn't have an "index" property, gettags() would
assign all of them the same index. The following call to table.sort() would then
do random magic to these tags (remember: table.sort() is not a stable sorting
algorithm, so it is allowed to randomly swap around entries which have the same
sorting key).

Fix this by making sure that the new "index" properties are different from each
other.

Signed-off-by: Uli Schlachter <psychon@znc.in>

2 months agorc.lua: Fix titlebar button events (FS#1116)
Uli Schlachter [Thu, 14 Mar 2013 19:14:43 +0000 (20:14 +0100)]
rc.lua: Fix titlebar button events (FS#1116)

Due to some layout changes, the client title widget is no longer assigned all
the remaining space. To work around this, we wrap the widget in a flex layout
which means that it asks for all the available space. This way, moving via the
titlebar works again.

Additionally, these button events are now also assigned to the client's icon
widget. No idea why this wasn't done before...

Signed-off-by: Uli Schlachter <psychon@znc.in>

2 months agoSend correct size to fullscreen clients (FS#1093)
Uli Schlachter [Wed, 13 Mar 2013 20:20:13 +0000 (21:20 +0100)]
Send correct size to fullscreen clients (FS#1093)

Titlebars are not visible for fullscreen clients, so it doesn't make sense to
substract the area used for the titlebar in ConfigureNotify events.

Signed-off-by: Uli Schlachter <psychon@znc.in>

2 months agoawful.tag: add index property for custom tag order
cdump [Wed, 2 Jan 2013 14:06:45 +0000 (15:06 +0100)]
awful.tag: add index property for custom tag order

Signed-off-by: Uli Schlachter <psychon@znc.in>

2 months agoFix ignoring size hints
Uli Schlachter [Tue, 12 Mar 2013 10:33:05 +0000 (11:33 +0100)]
Fix ignoring size hints

The function c:geometry() should only honor size hints if this was enabled for
this client. Whoops.

Signed-off-by: Uli Schlachter <psychon@znc.in>

2 months agoawful.util.spawn_with_shell: Use table as argument
Uli Schlachter [Sun, 10 Mar 2013 14:00:05 +0000 (15:00 +0100)]
awful.util.spawn_with_shell: Use table as argument

Thanks to the previous commit, spawn_with_shell() can now easily fix lots of
problems that we previously had with escaping the argument to the shell.

Signed-off-by: Uli Schlachter <psychon@znc.in>

2 months agoawesome.spawn: Accept tables as arguments
Uli Schlachter [Sun, 10 Mar 2013 13:54:58 +0000 (14:54 +0100)]
awesome.spawn: Accept tables as arguments

With this change, awesome.spawn() can be called with a table as its command line
argument. This gets rid of lots of problems with escaping the arguments. For
example, the following call is now possible:

  awesome.spawn({ "bash", "-c", "echo \"foo\"" })

Thanks to Ignas Anikevičius for inspiring me to this.

Signed-off-by: Uli Schlachter <psychon@znc.in>

2 months agowibox: Improve constructor functions for some layouts
Uli Schlachter [Sun, 10 Mar 2013 12:46:28 +0000 (13:46 +0100)]
wibox: Improve constructor functions for some layouts

Signed-off-by: Uli Schlachter <psychon@znc.in>

2 months agoMove size hints handling back into C (FS#1117)
Uli Schlachter [Sun, 10 Mar 2013 11:13:32 +0000 (12:13 +0100)]
Move size hints handling back into C (FS#1117)

Having this in lua means that size hints are only applied after the client got
resized. The bad side effect of this is some flickering if awesome is being
slow. And apparently, it is slow for way too many people...

Signed-off-by: Uli Schlachter <psychon@znc.in>

2 months agowibox.layout.constraint: fix the min and max strategies
Lukáš Hrázký [Sat, 19 Jan 2013 14:59:27 +0000 (15:59 +0100)]
wibox.layout.constraint: fix the min and max strategies

Fixes mixed up min/max strategies and other bugs in min and max. Also
removes enforcing the size in draw, adhering more to awesome's layout
concept.

Signed-off-by: Lukáš Hrázký <lukkash@email.cz>
Signed-off-by: Uli Schlachter <psychon@znc.in>

2 months agoRemove F1-9 bindings from the manpages.
Ignas Anikevicius (gns_ank) [Sat, 19 Jan 2013 13:25:33 +0000 (13:25 +0000)]
Remove F1-9 bindings from the manpages.

There was a leftover info about marked client keybindings and the
default rc.lua doesn't have those.

Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>

2 months agoMake awful.util.cycle() less while'y
Poggles [Sat, 12 Jan 2013 20:08:50 +0000 (20:08 +0000)]
Make awful.util.cycle() less while'y

Signed-off-by: Uli Schlachter <psychon@znc.in>

2 months agowibox.wibox.systray: Allow multiple systrays
Uli Schlachter [Sun, 10 Mar 2013 10:11:43 +0000 (11:11 +0100)]
wibox.wibox.systray: Allow multiple systrays

This has to be removed because it breaks the fallback to the default config if
the first config already managed to create a systray widget. This doesn't mean
that it is suddenly possible to have the systray visible in more than one place,
it just means that awesome will no longer complain about this.

Signed-off-by: Uli Schlachter <psychon@znc.in>

2 months agonaughty: Handle broken icon arguments better (FS#1076)
Uli Schlachter [Sun, 10 Mar 2013 09:57:49 +0000 (10:57 +0100)]
naughty: Handle broken icon arguments better (FS#1076)

Before this, surface.load() would throw a lua error because it couldn't load the
icon which broke naughty's state.

With this commit, this error is caught and an error message is printed on stderr
instead.

Signed-off-by: Uli Schlachter <psychon@znc.in>

2 months agowibox.drawable: Redraw when moved
Uli Schlachter [Wed, 20 Feb 2013 13:22:41 +0000 (14:22 +0100)]
wibox.drawable: Redraw when moved

Let's consider the following notification:

  naughty.notify({ text = "foo", bg = "#88888888", timeout=1 })
  naughty.notify({ text = "foo", bg = "#88888888", timeout=2 })

When the first notification disappears, the second one is moved and takes its
place. However, its content was not redrawn. This makes the pseudo-transparency
break and the wallpaper that is shown in the back of the notification doesn't
match the real wallpaper.

Fix this by redrawing drawables when they get moved.

Signed-off-by: Uli Schlachter <psychon@znc.in>

2 months agoRemove NoDisplay from desktop file
Julien Danjou [Mon, 25 Feb 2013 10:49:43 +0000 (11:49 +0100)]
Remove NoDisplay from desktop file

Signed-off-by: Julien Danjou <julien@danjou.info>

3 months agowibox.drawable: Don't redraw drawables without surfaces (FS#1079)
Uli Schlachter [Wed, 20 Feb 2013 13:19:31 +0000 (14:19 +0100)]
wibox.drawable: Don't redraw drawables without surfaces (FS#1079)

Thanks to the previous commit, a drawable can no longer have a finished cairo
surface. Instead, it will now have a nil surface. This commit handles this new
possibility.

Signed-off-by: Uli Schlachter <psychon@znc.in>

3 months agoDrawable: Improve signal behavior
Uli Schlachter [Wed, 20 Feb 2013 13:09:19 +0000 (14:09 +0100)]
Drawable: Improve signal behavior

When property::surface is emitted, the drawable didn't know its geometry yet,
which had weird side effects. Fix this by changing the C API a little. The
function drawable_set_surface() now no longer allows a NULL surface as its
argument.

The required changes for the titlebar code also means that we no longer throw
away the double-buffering surface when a client is moved.

Signed-off-by: Uli Schlachter <psychon@znc.in>

3 months agowibox.widget.textbox: return 0, 0 from fit() if either w or h is 0
Lukáš Hrázký [Sun, 20 Jan 2013 14:00:29 +0000 (15:00 +0100)]
wibox.widget.textbox: return 0, 0 from fit() if either w or h is 0

A hack around abusing the fact that width of a textbox is 0 when its
empty, while it's height is still set according to the font.

Signed-off-by: Lukáš Hrázký <lukkash@email.cz>
Signed-off-by: Uli Schlachter <psychon@znc.in>

3 months agowibox.layout.flex: add set_max_widget_size() function
Lukáš Hrázký [Sun, 20 Jan 2013 14:00:28 +0000 (15:00 +0100)]
wibox.layout.flex: add set_max_widget_size() function

The function can be used to set the maximum size the widget in the
flex layout should take.

Signed-off-by: Lukáš Hrázký <lukkash@email.cz>
Signed-off-by: Uli Schlachter <psychon@znc.in>

3 months agoRaise the window on EWMH request.
Stefan Haller [Sun, 20 Jan 2013 14:35:10 +0000 (15:35 +0100)]
Raise the window on EWMH request.

Additionally to handing over the focus to the window this commit raises
the window too. Otherwise a window which is hidden below other windows can
request the focus and because the window is not fully exposed, the user is
unaware which window has the input focus and is actually receiving the
keystrokes.

Signed-off-by: Stefan Haller <haliner@googlemail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>

3 months agoMake awful.layout.inc() accept a screen number
Poggles [Tue, 19 Feb 2013 03:53:58 +0000 (03:53 +0000)]
Make awful.layout.inc() accept a screen number

Signed-off-by: Uli Schlachter <psychon@znc.in>

3 months agowibox.widget.systray: Properly work when rotated (FS#1115)
Uli Schlachter [Sat, 16 Feb 2013 21:14:08 +0000 (22:14 +0100)]
wibox.widget.systray: Properly work when rotated (FS#1115)

The systray widget's fit() function worked in the (rotated) user coordinate
space while the draw() function used device coordinates (unrotated). This meant
that width and height were swapped up in the calculations and the systray ended
up being way too small.

Fix this by making the draw() function use user coordinates, too. This means
that it needs some new magic to detect a rotated coordinate space. This, in
turn, means that the systray is now automatically rotated when you put it into a
rotate layout.

This might cause some minor breakage because people no longer need to call
:set_horizontal() on the widgets.

Thanks a lot to Alexander Gehrke for his help!

Signed-off-by: Uli Schlachter <psychon@znc.in>

3 months agogears.wallpaper: Create smaller image surface (FS#1087)
Uli Schlachter [Tue, 12 Feb 2013 14:15:16 +0000 (15:15 +0100)]
gears.wallpaper: Create smaller image surface (FS#1087)

When no wallpaper exists yet, instead of creating a black image surface which
covers all the screens, just create a surface for the screen which we need. This
means that way less pixels have to be uploaded to the X11 server, which should
be faster.

Signed-off-by: Uli Schlachter <psychon@znc.in>

3 months agoRefresh focus on FocusIn events
Uli Schlachter [Mon, 11 Feb 2013 15:19:28 +0000 (16:19 +0100)]
Refresh focus on FocusIn events

To avoid some oddities, awesome sets the input focus lazily. Instead of
immediately sending everything to the X11 server, awesome just sets a flag "have
to update the focus later".

However, this can cause problems. As Stefan noticed, awesome can forget about
focus changes on FocusIn events when such an event comes in while we still have
a pending focus change.

The fix here is to send out the pending focus change before we record the fact
that another client now acquired the input focus.

Reported-By: Stefan Haller <haliner@googlemail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>

3 months agoIncorrect calculation of unused size (FS#1108)
Felix Bier [Wed, 30 Jan 2013 08:23:28 +0000 (09:23 +0100)]
Incorrect calculation of unused size (FS#1108)

Signed-off-by: Felix Bier <flx.bier@googlemail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>

3 months agogears.color: Accept cairo patterns as arguments
Uli Schlachter [Mon, 11 Feb 2013 13:26:05 +0000 (14:26 +0100)]
gears.color: Accept cairo patterns as arguments

This allows to use cairo patterns directly for any kind of "color". This makes
it easier to use things which aren't possible through gears.color.

Signed-off-by: Uli Schlachter <psychon@znc.in>

3 months agoFix keyboard layouts
Uli Schlachter [Fri, 1 Feb 2013 22:06:08 +0000 (23:06 +0100)]
Fix keyboard layouts

Commit 08ca70c00d06c6 added support for Xlib cursor themes by making awesome use
Xlib for its X11 connection and for setting cursor icons. Everything else was
still done through xcb.

However, an unexpected side effect of this is that Xlib enabled the XKB
extension without asking us. This changes the way that keyboard events are
reported which causes problems with various keyboard events.

(Normally, Xlib hides these things by silently fixing up the events that it
hands out to applications. However, since we bypassed Xlib via xcb...)

The fix is simple: Luckily Xlib provides a function for disabling its XKB
support which is just what we need.

Signed-off-by: Uli Schlachter <psychon@znc.in>

3 months agoroot.wallpaper: Use main connection for pixmap filling (FS#1087)
Uli Schlachter [Thu, 24 Jan 2013 17:54:35 +0000 (18:54 +0100)]
root.wallpaper: Use main connection for pixmap filling (FS#1087)

Previously, cairo would often have to download the old wallpaper from the X11
server and then upload it again. It did this because it couldn't see that the
two X11 connections involved are actually connected to the same X11 server.

This commit fixes this by setting up the pixmap from our main X11 connection.
This is the same connection that we use for accessing the "old" wallpaper and
thus cairo doesn't have to do stupid things.

The big improvement with this is that this speeds up wallpaper setup a lot.

Signed-off-by: Uli Schlachter <psychon@znc.in>

4 months agogears.wallpaper: Add wallpaper.fit
Thomas Jost [Thu, 10 Jan 2013 12:58:40 +0000 (13:58 +0100)]
gears.wallpaper: Add wallpaper.fit

Signed-off-by: Thomas Jost <schnouki@schnouki.net>
Signed-off-by: Uli Schlachter <psychon@znc.in>

4 months agomenubar: Treat KP_Enter as pressing Enter (FS#1072)
Alexander Yakushev [Wed, 2 Jan 2013 10:41:35 +0000 (12:41 +0200)]
menubar: Treat KP_Enter as pressing Enter (FS#1072)

Signed-off-by: Uli Schlachter <psychon@znc.in>

4 months agoMenubar utils fix the wm_name matching once more.
Ignas Anikevicius (gns_ank) [Thu, 10 Jan 2013 00:22:46 +0000 (02:22 +0200)]
Menubar utils fix the wm_name matching once more.

The previous attempt at making the utils.wm_name variable useful for
accessing some entries was silly. This is because a typical ShowOnlyIn
string would look as: 'Unity;Gnome;KDE;' and the matching currently is
done for the whole string, where as we need to match only a part of it.

This small (hackish) commit fixes that, or do we wanna parse this line
of a .desktop file properly?

Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>

4 months agowibox.layout.align: Give middle widget full height
Uli Schlachter [Tue, 8 Jan 2013 21:06:25 +0000 (22:06 +0100)]
wibox.layout.align: Give middle widget full height

I amended some change to commit 8560de597c3a1f349 which made the align layout's
middle widget really centered instead of being way too wide. However, this also
shrunk the widget on the "other" axis, too. This commit fixes that up.

A big "sorry" to Lukáš for breaking his patch.

Signed-off-by: Uli Schlachter <psychon@znc.in>

4 months agofix locale problem (decimal separator isn't dot but comma)
uzsolt [Wed, 2 Jan 2013 11:13:45 +0000 (12:13 +0100)]
fix locale problem (decimal separator isn't dot but comma)

If user changes locale with os.setlocale to a "dirty"
locale (which use comma as decimal separator (not dot), e.g.
hu_HU) `tonumber` will produce "0,6" instead of "0.6"
which causes bad comparision.

Signed-off-by: uzsolt <udvzsolt@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>

4 months agoawful.widget.common: remove unsed function
Lukáš Hrázký [Sat, 5 Jan 2013 15:51:14 +0000 (16:51 +0100)]
awful.widget.common: remove unsed function

Signed-off-by: Lukáš Hrázký <lukkash@email.cz>
Signed-off-by: Uli Schlachter <psychon@znc.in>

4 months agotasklist: add a theme option for a plain task name
Lukáš Hrázký [Sat, 5 Jan 2013 15:51:13 +0000 (16:51 +0100)]
tasklist: add a theme option for a plain task name

If theme.tasklist_plain_task_name is set to true, the various client
state marks will not be prepended to the task name.

Signed-off-by: Lukáš Hrázký <lukkash@email.cz>
Signed-off-by: Uli Schlachter <psychon@znc.in>

4 months agowibox.layout: add a new constraint layout
Lukáš Hrázký [Sat, 5 Jan 2013 15:12:52 +0000 (16:12 +0100)]
wibox.layout: add a new constraint layout

This layout can be used to constraint the size of the widget it holds.
Depending on the strategy passed to it, the widget will have a minimum,
maximum or exact size that was set through this layout.

Signed-off-by: Lukáš Hrázký <lukkash@email.cz>
Signed-off-by: Uli Schlachter <psychon@znc.in>

4 months ago{tag,task}list: add update_function and base_widget constructor arguments
Lukáš Hrázký [Sat, 5 Jan 2013 15:12:51 +0000 (16:12 +0100)]
{tag,task}list: add update_function and base_widget constructor arguments

The arguments are optional, making it possible to use a custom function
to create the {tag,task}list layout. The base_widget arguments can be
used to override the base layout of the {tag,task}list widget.

Signed-off-by: Lukáš Hrázký <lukkash@email.cz>
Signed-off-by: Uli Schlachter <psychon@znc.in>

4 months agowibox.layout.align: make the middle widget really centered
Lukáš Hrázký [Sat, 5 Jan 2013 15:12:50 +0000 (16:12 +0100)]
wibox.layout.align: make the middle widget really centered

Centers the middle widget in the align layout in the remaining space
left by the widgets on the sides.

Signed-off-by: Lukáš Hrázký <lukkash@email.cz>
Signed-off-by: Uli Schlachter <psychon@znc.in>

4 months agowibox.layout.align: don't take up all space in the other axis
Lukáš Hrázký [Sat, 5 Jan 2013 15:12:49 +0000 (16:12 +0100)]
wibox.layout.align: don't take up all space in the other axis

This adds a fit function to the align layout that makes sure that
the layout will not take up all the available space in the other
axis than it's direction. Eg. for horizontal align layout, it will
only take up the maximum of its widgets' heights in the vertical axis.

Signed-off-by: Lukáš Hrázký <lukkash@email.cz>
Signed-off-by: Uli Schlachter <psychon@znc.in>

4 months agowibox.layout.flex: fix the fit function
Lukáš Hrázký [Sat, 5 Jan 2013 15:12:48 +0000 (16:12 +0100)]
wibox.layout.flex: fix the fit function

The fit function of the flex layout is different from the fixed.fit one.

Signed-off-by: Lukáš Hrázký <lukkash@email.cz>
Signed-off-by: Uli Schlachter <psychon@znc.in>

4 months agowibox.layout: remove unnecessary wrapping of draw and fit functions
Lukáš Hrázký [Sat, 5 Jan 2013 15:12:47 +0000 (16:12 +0100)]
wibox.layout: remove unnecessary wrapping of draw and fit functions

Signed-off-by: Lukáš Hrázký <lukkash@email.cz>
Signed-off-by: Uli Schlachter <psychon@znc.in>

4 months agoawful.screen.getbycoord(): Always return a valid screen
Uli Schlachter [Sat, 5 Jan 2013 19:56:20 +0000 (20:56 +0100)]
awful.screen.getbycoord(): Always return a valid screen

No callers expect a nil result from this function. In fact, this broke
awful.tooltip because it tried to get the workarea of screen nil.

Signed-off-by: Uli Schlachter <psychon@znc.in>

4 months agoawful.tooltip: Don't place tooltips when text changes
Uli Schlachter [Sat, 5 Jan 2013 19:54:38 +0000 (20:54 +0100)]
awful.tooltip: Don't place tooltips when text changes

The tooltip is now only placed when it is made visible, not while it is
invisible.

Signed-off-by: Uli Schlachter <psychon@znc.in>

4 months agoFix mouse.object_under_cursor() with drawins
Uli Schlachter [Sat, 5 Jan 2013 19:53:13 +0000 (20:53 +0100)]
Fix mouse.object_under_cursor() with drawins

This was telling lua that no results are to be returned, but still tried to
return something. Thus, lua ignored the result.

Signed-off-by: Uli Schlachter <psychon@znc.in>

4 months agowibox.layout.rotate: Add some good constructor arguments
Uli Schlachter [Sat, 5 Jan 2013 19:52:00 +0000 (20:52 +0100)]
wibox.layout.rotate: Add some good constructor arguments

Signed-off-by: Uli Schlachter <psychon@znc.in>

4 months agowibox.layout.base: Use math.min/max
Uli Schlachter [Sat, 5 Jan 2013 19:50:17 +0000 (20:50 +0100)]
wibox.layout.base: Use math.min/max

Signed-off-by: Uli Schlachter <psychon@znc.in>

5 months agochange codename v3.5
Uli Schlachter [Fri, 21 Dec 2012 23:18:18 +0000 (00:18 +0100)]
change codename

Signed-off-by: Uli Schlachter <psychon@znc.in>

5 months agowibox button: Fix the x/y position in button events
Uli Schlachter [Sun, 16 Dec 2012 17:17:03 +0000 (18:17 +0100)]
wibox button: Fix the x/y position in button events

The coordinates as used by X11 place (0, 0) at the top-left corner of the
window, including its border. However, this code wants the position relative to
the drawin's content, thus we also need to substract the border width.

Signed-off-by: Uli Schlachter <psychon@znc.in>

5 months agoawful.placement.no_offscreen: Fix border handling (FS#1065)
Uli Schlachter [Sun, 16 Dec 2012 17:11:57 +0000 (18:11 +0100)]
awful.placement.no_offscreen: Fix border handling (FS#1065)

The (x,y) position of a client is outside of the border, but the width/height
does not include the border (so the real width is width+2*border).

This means that we have to also subtract 2*border to make sure that the client
including its border really is inside of the expected area.

Signed-off-by: Uli Schlachter <psychon@znc.in>

5 months agonaughty: Fix docs a little
Uli Schlachter [Sun, 16 Dec 2012 10:40:06 +0000 (11:40 +0100)]
naughty: Fix docs a little

Signed-off-by: Uli Schlachter <psychon@znc.in>

5 months agoExpose naughty.notifications again
Daniel [Sat, 15 Dec 2012 19:58:18 +0000 (20:58 +0100)]
Expose naughty.notifications again

Signed-off-by: Uli Schlachter <psychon@znc.in>

5 months agoawful.widget.button: Fix name clash (FS#1064)
Uli Schlachter [Sat, 15 Dec 2012 09:08:23 +0000 (10:08 +0100)]
awful.widget.button: Fix name clash (FS#1064)

Signed-off-by: Uli Schlachter <psychon@znc.in>

5 months agochange codename v3.5-rc2
Uli Schlachter [Fri, 14 Dec 2012 18:53:42 +0000 (19:53 +0100)]
change codename

Signed-off-by: Uli Schlachter <psychon@znc.in>

5 months agomouse.resize: Allow resize across screens (FS#1059)
Uli Schlachter [Fri, 14 Dec 2012 18:38:30 +0000 (19:38 +0100)]
mouse.resize: Allow resize across screens (FS#1059)

No clue why this code is here, but it only allowed floating clients to be
resized beyond the edge of their screen. Clients on a floating layout were
forced to stay on their screen. Quite an unintuitive behavior and now this
behavior is gone.

Signed-off-by: Uli Schlachter <psychon@znc.in>

5 months agoCorrectly handle focus across restarts (FS#1055)
Uli Schlachter [Thu, 13 Dec 2012 19:31:18 +0000 (20:31 +0100)]
Correctly handle focus across restarts (FS#1055)

X11 is a great protocol. When a window manager dies, it can make sure that
client windows don't get destroyed via the save-set. However, revert-to-parent
focus handling means that the focus now shifts to the parent which gets
destroyed and afterwards the focus is "none", which is a really bad state.

Fix this in two places:

First, when shutting down, we switch to PointerRoot mode. This makes sure that
the input focus follows the mouse pointer if no window manager is started.

Also make sure that we set the input focus the way we want it to be after start
up. This obviously cleans up any weird state which might exist before we manage
the input focus.

Signed-off-by: Uli Schlachter <psychon@znc.in>

5 months agoFix minimizedcurrenttags filter with sticky clients
Björn Åström [Thu, 13 Dec 2012 02:30:37 +0000 (03:30 +0100)]
Fix minimizedcurrenttags filter with sticky clients

Sticky clients showed up in the tasklist without being minimized when using the minimizedcurrenttags filter.
This patch fixes that.

Signed-off-by: Björn Åström <bjoast@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>

5 months agoFix wibox.layout.rotate
Uli Schlachter [Wed, 5 Dec 2012 16:35:08 +0000 (17:35 +0100)]
Fix wibox.layout.rotate

This got broken in commit 90f7f553482a97655d80.

Thanks to crazedpsyc for reporting this.

Signed-off-by: Uli Schlachter <psychon@znc.in>

5 months agoImproved .desktop parsing (FS#1057)
Arvydas Sidorenko [Sat, 1 Dec 2012 14:42:00 +0000 (15:42 +0100)]
Improved .desktop parsing (FS#1057)

When parsing .desktop, we care only about [Desktop Entry] group.
Everything else is ignored.

Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>

5 months agoRenamed string.gfind to string.gmatch
Arvydas Sidorenko [Sat, 1 Dec 2012 13:02:49 +0000 (14:02 +0100)]
Renamed string.gfind to string.gmatch

Lua 5.1: string.gfind renamed to string.gmatch
Lua 5.2: string.gfind removed

Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>

5 months agoFix various instances of global variables
Uli Schlachter [Fri, 30 Nov 2012 21:46:55 +0000 (22:46 +0100)]
Fix various instances of global variables

The modules awful.menu and awful.util were placing variables in the global
environment which is a bad thing. Fix this by adding the right module name
prefixes to these variables.

Signed-off-by: Uli Schlachter <psychon@znc.in>

5 months agoUpdate titlebar color when focus changes (FS#1056)
Uli Schlachter [Thu, 29 Nov 2012 15:52:19 +0000 (16:52 +0100)]
Update titlebar color when focus changes (FS#1056)

The current code relied on some widget to cause a redraw when the focus changes.
Obviously, this assumption is wrong.

Instead, the code now uses the proper "focus" and "unfocus" signals for setting
titlebar colors, but it also needs to set these colors when a new titlebar is
created (v1 of this patch forgot that). For this reason, update_colors has to be
saved for when a titlebar's colors are updated.

This commit also reverts the ugly redraw_hook hack from commit a1918b8306f3a03.

Signed-off-by: Uli Schlachter <psychon@znc.in>

5 months agoFix errors from missing themes
Uli Schlachter [Tue, 27 Nov 2012 21:55:42 +0000 (22:55 +0100)]
Fix errors from missing themes

This patch gets rid of lots of errors that happen when beautiful.init() is not
called in the config. Most of them were missing default values.

Thanks to panthar for reporting this.

Signed-off-by: Uli Schlachter <psychon@znc.in>

5 months agoimagebox: Use a different entry for saving the image
Uli Schlachter [Tue, 27 Nov 2012 16:24:54 +0000 (17:24 +0100)]
imagebox: Use a different entry for saving the image

In 3.4, an imagebox' image is set via "box.image = foo". Since widgets are just
ordinary tables in 3.5, this will actually mess with the imagebox' image without
setting it correctly.

Fix this by renaming the entry to "_image".

A similar patch was applied to the textbox widget ages ago.

Signed-off-by: Uli Schlachter <psychon@znc.in>

5 months agoawful.menu.clients: Fix client icons
Uli Schlachter [Sun, 25 Nov 2012 20:18:23 +0000 (21:18 +0100)]
awful.menu.clients: Fix client icons

This was passing c.icon as the icon of a menu entry. However, this is just a
light userdata which has to be turned into an lgi cairo surface object. Luckily,
surface.load() does that for us.

Signed-off-by: Uli Schlachter <psychon@znc.in>

5 months agoCMake: Check for the needed lgi dependency
Uli Schlachter [Sun, 25 Nov 2012 18:43:09 +0000 (19:43 +0100)]
CMake: Check for the needed lgi dependency

We only need lgi for running, not for building. This means that our lgi
dependency is easily missed. This commit makes this dependency more explicit.

Signed-off-by: Uli Schlachter <psychon@znc.in>

5 months agoawful.menu: Handle themes without border_width
Uli Schlachter [Sun, 25 Nov 2012 18:17:27 +0000 (19:17 +0100)]
awful.menu: Handle themes without border_width

Signed-off-by: Uli Schlachter <psychon@znc.in>

5 months agowidgets: Add some constructor arguments
Uli Schlachter [Sun, 25 Nov 2012 18:16:31 +0000 (19:16 +0100)]
widgets: Add some constructor arguments

This saves space when constructing widgets, because some common cases can now be
done in a single line of code.

Signed-off-by: Uli Schlachter <psychon@znc.in>

5 months agoMenubar: silence find warnings
Gregor Best [Sat, 24 Nov 2012 16:58:15 +0000 (17:58 +0100)]
Menubar: silence find warnings

Signed-off-by: Gregor Best <gbe@ring0.de>
Signed-off-by: Uli Schlachter <psychon@znc.in>

5 months agoMenubar: also look in /usr/local/share/applications
Gregor Best [Sat, 24 Nov 2012 16:57:56 +0000 (17:57 +0100)]
Menubar: also look in /usr/local/share/applications

Signed-off-by: Gregor Best <gbe@ring0.de>
Signed-off-by: Uli Schlachter <psychon@znc.in>

5 months agoMenubar: don't die if there's no item selected
Gregor Best [Sat, 24 Nov 2012 16:57:27 +0000 (17:57 +0100)]
Menubar: don't die if there's no item selected

Signed-off-by: Gregor Best <gbe@ring0.de>
Signed-off-by: Uli Schlachter <psychon@znc.in>

5 months agoRemove compiler warnings
Gregor Best [Sat, 24 Nov 2012 16:57:02 +0000 (17:57 +0100)]
Remove compiler warnings

Signed-off-by: Gregor Best <gbe@ring0.de>
Signed-off-by: Uli Schlachter <psychon@znc.in>

5 months agoChange CFLAGS
Gregor Best [Sat, 24 Nov 2012 16:54:25 +0000 (17:54 +0100)]
Change CFLAGS

* Add -O1 to make -wuninitialized work
* Remote -Wredundant-decls because it gave useless warnings

Signed-off-by: Gregor Best <gbe@ring0.de>
Signed-off-by: Uli Schlachter <psychon@znc.in>

5 months agochange codename v3.5-rc1
Uli Schlachter [Sat, 24 Nov 2012 13:51:33 +0000 (14:51 +0100)]
change codename

Signed-off-by: Uli Schlachter <psychon@znc.in>

6 months agoMenubar: Expose the wm_name attribute
Ignas Anikevicius (gns_ank) [Thu, 22 Nov 2012 11:11:47 +0000 (11:11 +0000)]
Menubar: Expose the wm_name attribute

This commit makes it possible to change the wm_name attribute, which
means that programs can be shown/hidden according to the wishes of the
user.

Possible usecase: A user is using Gnome and Awesome together, but sinc
wm_name by default is awesome, all the apps shipped with GNOME DE are
hidden by default. Changing wm_name attribute in this case would solve
the issue.

Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>

6 months agoscreen: Ignore RANDR displays in clone mode (FS#1046)
Uli Schlachter [Wed, 21 Nov 2012 21:08:12 +0000 (22:08 +0100)]
screen: Ignore RANDR displays in clone mode (FS#1046)

This just makes the code for ignoring screens on Xinerama apply to RANDR screens
as well. The code now also applies to protocol screens, but there is only ever a
single one of those, so nothing should change here.

Signed-off-by: Uli Schlachter <psychon@znc.in>

6 months agodbus: Fix event handling
Uli Schlachter [Wed, 21 Nov 2012 21:05:15 +0000 (22:05 +0100)]
dbus: Fix event handling

The port to glib failed to actually watch the file descriptor for events and
thus awesome silently ignored all dbus messages. My bad.

Signed-off-by: Uli Schlachter <psychon@znc.in>

6 months agoUse glib instead of libev
Uli Schlachter [Wed, 21 Nov 2012 20:01:12 +0000 (21:01 +0100)]
Use glib instead of libev

This commit ports awesome from libev to the glib main loop. This means that
awesome has fewer dependencies, because we were already depending on glib before
and now no longer need glib.

However, the main reason for this change is that, thanks to lgi, we have glib
bindings for lua. This means that lua code can add all kinds of event sources to
the main loop (timeouts, fd watchers, SIGCHLD watchers, ....). Yay

Signed-off-by: Uli Schlachter <psychon@znc.in>

6 months agoluadoc: Fix a typo for awesome.release
Uli Schlachter [Mon, 19 Nov 2012 17:56:46 +0000 (18:56 +0100)]
luadoc: Fix a typo for awesome.release

Signed-off-by: Uli Schlachter <psychon@znc.in>

6 months agoawful.client.toggletag: Use tag.getscreen()
Uli Schlachter [Mon, 19 Nov 2012 17:56:18 +0000 (18:56 +0100)]
awful.client.toggletag: Use tag.getscreen()

Thanks to muni for reporting this bug.

Signed-off-by: Uli Schlachter <psychon@znc.in>

6 months agoFix warnings from LDoc
Uli Schlachter [Mon, 19 Nov 2012 14:35:32 +0000 (15:35 +0100)]
Fix warnings from LDoc

Signed-off-by: Uli Schlachter <psychon@znc.in>

6 months agoUse LDoc instead of Luadoc (FS#1006)
Uli Schlachter [Mon, 19 Nov 2012 13:57:47 +0000 (14:57 +0100)]
Use LDoc instead of Luadoc (FS#1006)

Since we are no longer using module(), luadoc no longer understands our modules.
With this commit we use LDoc instead which seems more modern.

Signed-off-by: Uli Schlachter <psychon@znc.in>

6 months agoluadoc/: Remove luadoc hacks
Uli Schlachter [Mon, 19 Nov 2012 13:55:57 +0000 (14:55 +0100)]
luadoc/: Remove luadoc hacks

LDoc doesn't need any of this and actually breaks due to it.

Signed-off-by: Uli Schlachter <psychon@znc.in>