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>
Added a very simple example to show the usage, and applicability of
awful.menu by dynamically constructing a menu of clients that match a
particular rule.
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
Display the possible keys to the 'menu' params as a bullet list
(unreadable otherwise).
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
image:type() was removed from oocairo, because the ._NAME property already
exists and there's no need for two functions doing the same job.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Some time ago I added a --no-argb option with the short-hand version -a.
However, the short version didn't actually work. Whoops!
Signed-off-by: Uli Schlachter <psychon@znc.in>
Before this commit, c:tags(tags) and t:clients(clients) first removed all
tags/clients and then added the new one.
This is now changed into only removing the tags/clients that have to be removed
and leaving the others in place. Hopefully, this avoids all kinds of weird
issues which we had.
Signed-off-by: Uli Schlachter <psychon@znc.in>
To demonstrate keygrabber API usage, I added a small function to the
docs that can be bound to a key and used to resize clients using
keyboard.
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>