* Move the "index" setting burden to individual functions
instead of gettags().
* Add some properties earlier so the signal hooks will be called
with valid data.
This patch allows 2 things to be done:
* Write unit test to validate layouts using fake clients and tags
* Query the current layout geometry from another tag
The advantages of the former are clear and simple. Those of the later include:
* Creating a screenshot of another layout
* Display the layout wireframe in the tag list (like KDE2-3, Gnome2)
* Having and 'ALT-tab' like visual popup for tags
This function was accidentally setting the global variable "icontypes". Fix this
by adding the needed "local" and also localize some more variables for
consistency.
Signed-off-by: Uli Schlachter <psychon@znc.in>
`client.property.persist` can be used to make properties persistent
across restarts. This works by backing them up via X properties (using
the `awful.client.property.` prefix).
`client.property.persist(c, "floating", "boolean")` is used to make the
floating property persistent by default.
Based on a patch from Uli, source: https://gist.github.com/psychon/10320743
doc, only set current prop in 'persist'
Fix xprop/prop mixup in 'persist'
Only call set for non-nil values
This new awful module reacts to shapes that a client sets on itself and sets the
shape of awesome's frame window to match. This way, xeyes really gets
transparent parts again.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Setting a tag's screen to what it already is shouldn't have any bad effects.
However, this code messed up the tag order and selection status.
Fix this by returning early if the tag already has the right screen.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Since commit 9c69e857ed, awful.tag.setscreen() unsets a tag's index to make
sure things end up in a sane order on the new screen. Thus, the call to
setscreen() removed the "index" property that tag.move just set.
Fix this by setting the index after the screen.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Since commit 5b4666432f, we use set_text() instead of set_markup()
on the tooltip's textbox. This means it is no longer possible to use pango
markup in the tooltip which was not intended.
Fix this (properly) by introducing a :set_markup() function on tooltips (and use
it in the timer function to restore the old behavior).
Signed-off-by: Uli Schlachter <psychon@znc.in>
This inlines the set_defaults() function into its only caller and makes us less
stupid with the font property.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This makes the screen objects use our existing infrastructure for implementing
classes and objects with lua instead of hand-rolling an own version.
This results in some small API change: Screen objects no longer have an
add_signal() function and instead this function exists on the parent screen
class.
Signed-off-by: Uli Schlachter <psychon@znc.in>
The bugs this fix are:
* Invalid request using nil as screen
* Stop messing indexes in the old screen
* Prevent c.screen <-> t.screen mismatch
* Prevent no tags being selected in the old screen
When a screen doesn't have any tags selected, then just tag the new client with
all of the screen's tags. That way, we don't lose clients.
Also, if we failed at coming up with tags for a client, don't completely untag
it. This means that it can keep its old tags if it had any.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This reverts commit bbe86e4e25. That commit caused
unintuitive, special behavior. Instead, when someone wants us to set a screen,
we really should do so.
This commit partly reverts commit b4c83d0e70.
Because the C code emits property::screen before manage, this caused
awful.tag.withcurrent() to run on a client before it really was being managed.
This then tagged the client. Because of this tag changes, awful.layout reacted
and ran the layout code. Because c.type wasn't set up at this point yet, the
client wasn't considered to be floating yet. This caused the client's geometry
to change and thus its floating geometry was messed up.
Signed-off-by: Uli Schlachter <psychon@znc.in>
The current premise is that c.screen should be the same as
awful.tag.getscreen(t).
The addition in `ewmh.tag` appears to be the important part here,
changing the order in awful.rules.execute is (maybe) only for
consistency across the codebase.
By default, tag.history.restore switches between the previous history
states, which is not what should get done when deleting a tag.
Without this, deleting multiple tags in a row, will jump back to the
first/fallback tag, instead of the older history entries.
The current premise is that c.screen should be the same as
awful.tag.getscreen(t).
The addition in `ewmh.tag` appears to be the important part here,
changing the order in awful.rules.execute is (maybe) only for
consistency across the codebase.