Commit Graph

34 Commits

Author SHA1 Message Date
Uli Schlachter 23b30be106 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>
2013-03-10 12:13:32 +01:00
Uli Schlachter 10d48e1fc8 Send correct geometry in ConfigureNotifies
The code was sending out ConfigureNotify events which contained the size of the
frame window. Thus, the client assumed that it is was larger than it actually
was.

Fix this by subtracting the size of the titlebars from the geometry for the
event.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-10-29 10:20:03 +01:00
Uli Schlachter 41ef107b88 Add titlebars on the C side
This commit makes it possible to add titlebars to a client. These titlebars are
drawables.

The drawin's input handling is moved to the drawable. This allows it to use the
same code for drawin and titlebar input handling, although there are lots of
differences between the two on the C side.

On the lua side, a new wibox.drawable module is created which handles all the
drawable-specific magic and which can also be used for titlebars.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-10-14 17:30:59 +02:00
Uli Schlachter e57af377bb Don't pass cairo surfaces around on the lua stack
Now that the C code uses lightuserdata for passing around cairo surfaces, they
are no longer automatically garbage collected. To avoid memleaks, this commit
compares the C code to use cairo_surface_t pointers instead of the lua stack.

This also fixes a memleak were a client's icon was leaked.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-05-28 09:29:47 +02: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
Arnaud Fontaine be7fda45d8 Update the code following release of xcb-util 0.3.8.
xcb-util is now split into several repositories since 0.3.8. This
release also cleaned up the API a lot, thus update the code
accordingly.

Signed-off-by: Arnaud Fontaine <arnau@debian.org>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-05-10 18:27:39 +02:00
Uli Schlachter af5e5e8e9c Remove a useless function argument
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>
2011-03-27 20:07:14 +02:00
Uli Schlachter 08cd44dda7 drawin: Remove screen property
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>
2011-03-27 16:21:49 +02:00
Uli Schlachter eff4474c6d Move size-hints handling to lua
The C core now completely ignores size hints and let's lua handle them.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-03-11 17:21:00 +01:00
Uli Schlachter 3dbf89c990 Lazyle set the input focus (FS#804)
Instead of immediately setting the X11 input focus when client.focus is assigned
something, we now just remember that we'll have to do something later. The focus
is then set in the next prepare call by libev (= after the current main loop run
is done).

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-10 14:57:14 +02:00
Uli Schlachter af8fd15a8f client_unmanage(): Handle destroyed windows
When we receive a DestroyNotify, we have to unmanage the client. However, we
were just informed that the window was destroyed, so it doesn't make sense to
try to do "something" with the window.

This commits fixes some errors from the X server (which we ignored, but still
they are gone now).

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-07 12:05:43 +02:00
Uli Schlachter 146a5dd67c Convert a client's icon to a cairo surface
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-09-29 13:18:35 +02:00
Uli Schlachter acc0ca624b Move window type from client_t to window_t
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-09-27 21:52:18 +02:00
Julien Danjou 63e4ba460b client: client_set_focus is static, so merge
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-08-18 10:50:40 +02:00
Julien Danjou 195dac628b client: client_unfocus is static
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-08-18 10:47:01 +02:00
Julien Danjou 80d1a4ea96 client: client_unfocus_update is static
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-08-18 10:46:42 +02:00
Julien Danjou 712234b133 client: use window attribute rather than invalid
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-08-18 10:44:58 +02:00
Uli Schlachter 32d9a5b2ab Remove support for zaphod mode
This makes awesome support only a single X11 protocol screen. If you are still
using zaphod mode, you can run multiple instances of awesome on the single
screens, e.g.:

DISPLAY=:1.0 awesome & DISPLAY=:1.1 awesome &

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-16 13:47:40 +02:00
Uli Schlachter 9fbdecf26c Split up client_getbywin()
This splits up client_getbywin() into two different functions. One of them finds
a client by its frame window, the other checks against the client's own window.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-09 11:56:29 +02:00
Uli Schlachter 102063dbbd Turn this into a reparenting WM
Each window is now reparented under a window created by awesome. This window is
NOT visible, this commit should not cause any visible differences. Instead, this
is done to work around problems with X11.

The only alternative would be to ban windows by moving them offscreen which is
ugly in itself and breaks pagers. Doing it like this seems to be the better
solution.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-09 11:56:26 +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
Julien Danjou abd73e4f08 stack: stack_client_* calls stack_windows()
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-28 13:29:16 +02:00
Julien Danjou 4ef5e816ec client: remove internal geometry
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-28 13:29:11 +02:00
Julien Danjou c94f7b6767 window: import border_width property
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-28 13:29:06 +02:00
Julien Danjou a20400d60f client: move stack code into stack
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-28 13:28:49 +02:00
Julien Danjou ad23a4ca64 fix tag header and order build
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-28 13:28:25 +02:00
Julien Danjou 2b5bb2c34c window: add border_color property
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-28 13:28:15 +02:00
Julien Danjou d3c277b8ab window: add buttons support
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-28 13:28:05 +02:00
Julien Danjou 92717a0849 window: add strut support
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-28 13:27:45 +02:00
Julien Danjou 220d072164 window: import class
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-28 13:27:42 +02:00
Gregor Best 5987e48385 client: _really_ honor size hints
If c->honor_size_hints is set to false and the client indicates through
its hints that it wants to be fixed size (by setting min and max width
equal), size hints are not ignored due to client_isfixed not taking
honor_size_hints being false into account. This commit fixes that.

Signed-off-by: Gregor Best <gbe@ring0.de>
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-03-03 09:18:13 +01:00
Julien Danjou d8c0f516ba luaclass: implement object checking
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-10-27 12:16:30 +01:00
Julien Danjou 371ee3e8cc titlebar: remove
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-10-20 20:42:05 +02:00
Julien Danjou e204473dfc client: move into objects
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-10-20 20:42:05 +02:00