Let's just quote the bug report:
A regression was introduced in commit f5a5af4001
which causes wiboxes to position themselves incorrectly on Xinerama screens
besides the first one. In lib/awful/wibox.lua.in line 49, function
set_position(), the screen number used to use wibox.screen but now just defaults
to 1. Since the screen parameter is never actually passed to set_position(),
that means that wiboxes will always use screen 1's geometry when determining the
proper position. So, if a different screen is larger or smaller or isn't aligned
with the primary screen, the wibox will either be offscreen or not on the edge.
This should be fixed by explicitly passing the right screen argument to all
functions which need it.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Minimized clients can't have the input focus, so this key binding can't be used
for unminimizing them. Hopefully this clarifies the reason why.
Signed-off-by: Uli Schlachter <psychon@znc.in>
In the bundled rc.lua, mouse button 1 on a tasklist entry was configured to
bring the corresponding client to focus. Modify it to minimize the client if
already focussed.
Such (default) behavior seems more natural.
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
Apparently some people start a timer, switch to an empty tag and then let the
timer move a client to that empty tag. This change makes sure that this new
client will get the input focus in this case.
Signed-off-by: Uli Schlachter <psychon@znc.in>
There is no point in keeping this font cache alive for longer than needed.
Letting lua garbage-collect fonts should provide sane cache-behavior in that we
forgot about the font once no one uses it anymore.
Signed-off-by: Uli Schlachter <psychon@znc.in>
awesome.c contains this comment:
There can be no events yet, so if his function returns something, it must be
an error.
Sadly, this wasn't true. It seems like something managed to generate
MappingNotify events (no idea how).
Fix this by discarding all pending events after our GrabServer, but before we
ask for SubstructureRedirect on the root window.
Signed-off-by: Uli Schlachter <psychon@znc.in>
The menu was first made visible and then placed correctly. This caused a short,
black flicker in the top, left corner of the screen.
Fix this by removing a too early "visible = true".
This was introduced by me in 4d280365ad, sorry.
Signed-off-by: Uli Schlachter <psychon@znc.in>
So you want to make all Firefox windows floating except the main window
(instance = Navigator). You can either list all possible windows in
rules and make them floating, or make all of them floating except one:
{ rule = { class = "Firefox" },
except = { instance = "Navigator" },
properties = {floating = true},
}
More examples in the docs.
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
This fixes a crash when the opacity of a not-visible drawin is changed. This
happened because we got a PropertyNotify for our own change of _NET_WM_OPACITY
and then tried to set the drawin's opacity to this new value.
However, the drawin was only reachable through globalconf.drawins and wasn't
ref'd in lua. This means that the luaA_object_push() call in
property_handle_net_wm_opacity() didn't find the drawin and instead pushed a
nil. This then later caused an unprotected lua error in window_set_opacity().
Signed-off-by: Uli Schlachter <psychon@znc.in>
Both client_isvisible() and client_maybevisible() where almost exclusively
called with the client's screen as their second argument. Remove this second
argument and let these functions instead always act on the client's screen.
Signed-off-by: Uli Schlachter <psychon@znc.in>
There isn't much point in the screen property of a drawin because the geometry
already defines on which screen the drawin is.
The biggest chunk of changes from this is due to removing the functions
drawin_detach and drawin_attach which where called when the screen property was
set/unset.
The code from drawin_detach is moved into drawin_set_visible and drawin_wipe.
drawin_attach is moved into drawin_init.
Signed-off-by: Uli Schlachter <psychon@znc.in>
When some client sets an invalid window title, a lua error was generated while
updating the tasklist. This caused all later tasklist entries to be skipped /
missing and the last entry to be empty.
Fix this by catching lua errors with pcall.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Thanks to a recent commit, a drawin's window will always be a valid and existing
window. This means we can remove all the code which checks this before doing
something.
Signed-off-by: Uli Schlachter <psychon@znc.in>
We don't need an up-to-date pixmap and cairo surface for a drawin which isn't
visible. Thus, only bring those up-to-date when the drawin is visible.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Instead of creating/destroying a window whenever the drawin is attached/detached
from some screen, a window is now created when the drawin is created and it
isn't destroyed until the drawin is garbage collected.
Since we can now safely assume that a drawin always has a associated window,
this should make it possible to simplify some stuff.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This makes the imagebox widget refuse images which have a zero or negative width
or height. A zero size causes problems where a division by zero results in inf
which makes various stuff fail in weird ways later on.
Additionally, cairo's "error surfaces" have a negative size. Displaying those
would cause all sorts of weird problems, too, so we better reject those.
Signed-off-by: Uli Schlachter <psychon@znc.in>
awful.placement.no_overlap caused clients on an otherwise empty desktop to stich
to the top-left corner of the screen because it always preferred the top-left
corner of the available space.
This commit doesn't change the way in which the available area is computed, but
instead this now tries to keep the client at its original position if that is
available.
This fixes cases where calling awful.placement.no_overlap as a callback from an
awful.rule rule didn't work because the manage signal in the default config
later overrode that via calling awful.placement.no_overlap.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This corrects a type in awful.client.restore which caused it not to restore any
client at all if all clients are minimized.
Signed-off-by: Uli Schlachter <psychon@znc.in>
The elements in ${icon_sources}, as returned by file(GLOB ...) contain
double slashes, could be a bug in cmake. This causes building with
cmake 2.8.4 to fail, due to dependency problems lateron.
This patch works around the issue by normalizing all path names in
${icon_sources} while appending them to ${ALL_ICONS}, thereby removing
the double slashes.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This restores the first minimized client it finds on the selected tags.
Optionally, this function accepts a screen number as its first argument.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This fixes a bug where the tasklist would still show its old content after a
client was minimized/unminized because it didn't connect to the appropriate
signal.
This wasn't noticed before, because in most cases minimizing a client also
unfocuses this client which causes a tasklist update.
Signed-off-by: Uli Schlachter <psychon@znc.in>
awful.client.floating.get() does some sensible defaults. E.g. dialogs are
floating by default. Since floating.toggle only checked the property, these
defaults made it break.
So floating.toggle() should use floating.get to decide if a given client is
floating. It should also use "false" instead of "nil" when the client is made
non-floating or else the default will apply again.
Thanks to vsp for making me figure this out. :)
Signed-off-by: Uli Schlachter <psychon@znc.in>
When a client sets WM_NAME (client->alt_name) but doesn't set _NET_WM_NAME
(client->name), we give alt_name to lua when c.name is used. However, we still
emitted property::alt_name instead of property::name to lua. Obviously, this
breaks stuff.
(The same applies to client->alt_icon_name)
I noticed this via feh whose tasklist entry wasn't refreshed when multiple
images were displayed and I switched to the next one.
Signed-off-by: Uli Schlachter <psychon@znc.in>
When some client on the left monitor was closed while client.focus is on the
right monitor (e.g. 'sleep 5 ; exit' in a terminal), awful.autofocus would shift
the input focus to whatever client happened to be next in the focus history on
the left monitor.
Fix this by only ever moving the input focus between screens when a tag is
selected, not when some client does its magic.
Signed-off-by: Uli Schlachter <psychon@znc.in>