Commit Graph

15 Commits

Author SHA1 Message Date
Uli Schlachter 873358a0b8 EWMH: Handle _NET_WM_DESKTOP in lua
We now handle all "important" EWMH messages in lua and lua can decide to do
different things than the current obvious one.

Consistency!

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-03-17 16:15:20 +01:00
Daniel Hahler edaca590f6 Only set client's urgent after startup
This looks at awesome.startup in the default 'request::activate' signal
handler.
2014-03-16 21:26:05 +01:00
Uli Schlachter 8cf48d1fe8 Revert "awful.ewmh: Enforce client geometry (FS#764,FS#1216)"
This reverts commit 20afb26080.

The commit caused endless loops with tracebacks like this (shortened):

        lib/awful/ewmh.lua.in:122: in function <lib/awful/ewmh.lua.in:117>
        [C]: in function 'geometry'
        lib/awful/ewmh.lua.in:122: in function <lib/awful/ewmh.lua.in:117>
        [C]: in function 'geometry'
        lib/awful/ewmh.lua.in:122: in function <lib/awful/ewmh.lua.in:117>
        [C]: in function 'geometry'
2014-03-06 22:08:00 +01:00
Uli Schlachter 20afb26080 awful.ewmh: Enforce client geometry (FS#764,FS#1216)
When a client's geometry changes (and I consider the border width to be part of
the geometry here) and that client is one of fullscreen or
maximized_{horizontally,vertically}, make sure that the geometry as specified by
the state is still obeyed.

This also (accidentally) fixes things when a client gets moved to another
screen!

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-03-06 18:08:55 +01:00
Uli Schlachter 23e9258fb5 awful.ewmh: Correctly handle bw change for maximized clients
Due to a copy&paste error, maximized_vertical and maximized_horizontal were
handled the same. Of course, vertical and horizontal aren't the same direction.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-03-06 17:58:03 +01:00
Uli Schlachter 04dee81d13 client: Add request::activate signal (FS#848)
When we receive a _NET_ACTIVE_WINDOW request on the root window, we used to just
focus and raise the window. This didn't do much for clients which are on
non-selected tags.

Thus, this commit makes awesome emit request::activate on the client instead.
This is used in awful.ewmh to implement the old behavior again, but with
additionally marking the client as urgent if it isn't visible.

People who don't like this behavior can use client.disconnect_signal to disable
this behavior again. To make this really possible, awful.ewmh becomes a
"non-nil" module.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-03-06 17:47:55 +01:00
Arvydas Sidorenko 61ff9ce2b7 Ported awful 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 3cbb59b0dc FS#996: awful.ewmh: Connect to property::border_width signal
For example, I have some lua code which sets the border width based on the
number of visible clients. When just a single client is visible, the border
width is 0, else it's what the theme says.

Previously, this caused visible "glitches" for fullscreen'd and maximized
clients. This patch fixes that and updates the client's geometry and
border width appropriately.

This has a slight chance of going into an endless loop if someone sets a
fullscreen'd clients border width from its property::border_width signal.
Just don't do that!

Thanks to Arvydas Sidorenko for finding this issue.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-05-16 23:03:32 +02:00
Ignas Anikevicius (gns_ank) 5f8f245ab6 ewmh.lua: Fix the screen_change function
Fix this function so that it respects the recent changes in the ewmh.lua
code. It also incorporates some additional logic to respect the
border-width.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-03-03 11:45:13 +01:00
Ignas Anikevicius (gns_ank) 524a0c1b35 ewmh.lua: Account for the border-width
Previously we were not taking into account the border-width of the
client which we ought to as otherwise the client goes of the screen by
several pixels. It's slightly more ugly when we have several screens
connected.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-03-02 10:21:24 +01:00
Ignas Anikevicius (gns_ank) e37efaeb8a awful: ewmh.lua Fix unmaximization (#964)
This makes awful not to overwrite the saved geometry by just storing the
two geometries in separate places.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-03-01 17:10:13 +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 b6c8b95e34 Convert some more code to "class signals"
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-26 18:42:38 +02:00
Julien Danjou 6d332f07a0 lua{class,object}: rename signals functions
I knew this was wrong at the beginning, f*ck.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-08-25 20:28:20 +02:00
Julien Danjou 38edc58097 client: implements maximized and fullscreen requests with Lua
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-28 13:29:29 +02:00