Find a file
Uli Schlachter 2a6d5d207d client_stack(): Only stack windows once per mainloop
I was creating 2000 wiboxes in a loop (don't ask) and creating them took
forever. According to callgrind, there were about 2 million calls to
xcb_configure_window() and most (if not all) of them were from client_stack().
Awesome spent 70% of its cpu time in these client_stack() calls.

client_stack() is O(N^2) on the number of clients (it walks the list of clients
itself twice and each call to client_stack_above() walks the list too) and O(N)
on the number of wiboxes (it walks the wibox list twice). So obviously calls to
it should be rare.

This patch makes client_stack() only set a flag which is later checked. This
should reduce the number of restacks to the bare minimum. With this patch,
neither xcb_configure_window() nor anything else client_stack() related shows
up as having a lot of calls or using much cpu time.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-10 18:15:48 +02:00
build-utils layout: move layout code to Lua 2008-12-14 10:28:21 +01:00
common version: remove product name 2009-04-08 18:53:53 +02:00
icons themes: move theme icons to themes/ 2008-11-10 12:02:08 +01:00
lib awful.remote: import with remote eval 2009-04-08 17:08:26 +02:00
themes default theme: add fullscreen layout icons 2009-04-08 20:32:55 +02:00
utils import new awesome-client using D-Bus 2009-04-08 17:30:18 +02:00
widgets Move the definition of globalconf into a header file 2009-04-10 16:32:42 +02:00
.gitignore gitignore: add binaries 2008-09-22 10:37:07 +02:00
AUTHORS update AUTHORS 2009-04-08 19:01:20 +02:00
awesome-client.1.txt Revert "Replace tags by workspaces" 2008-06-09 21:56:03 +02:00
awesome-version-internal.h.in cmake: consolidate version strings 2008-06-22 22:13:06 +02:00
awesome.1.txt awesomerc: add keybinding to open menu with keygrabber 2009-03-12 19:57:36 +01:00
awesome.c Remove the argument to awesome_refresh() 2009-04-10 18:02:49 +02:00
awesome.desktop desktop: change description 2008-10-02 17:19:28 +02:00
awesome.doxygen.in layout: move layout code to Lua 2008-12-14 10:28:21 +01:00
awesome.h factorize quit/exec elements, and reparent systray 2008-09-02 17:12:10 +02:00
awesomeConfig.cmake build: stop checking for readline 2009-04-08 20:07:45 +02:00
awesomerc.5.txt draw: remove custom markup support 2008-12-14 10:28:23 +01:00
awesomerc.lua.in awesomerc: Lua prompt has no completion 2009-03-19 11:04:04 +01:00
awsetbg.1.txt awsetbg.1: add -m doc 2009-02-18 15:43:27 +01:00
BUGS BUG's page 2008-04-18 19:33:58 +02:00
client.c client_stack(): Only stack windows once per mainloop 2009-04-10 18:15:48 +02:00
client.h client_stack(): Only stack windows once per mainloop 2009-04-10 18:15:48 +02:00
CMakeLists.txt awesome-client: remove socket code 2009-04-08 17:56:25 +02:00
cnode.c comments fixing 2008-06-20 08:38:00 +02:00
cnode.h cnode: move struct to cnode header 2008-10-24 20:40:02 +02:00
config.h.in Fix default search path for configurations 2008-07-24 20:10:13 +02:00
dbus.c Remove the argument to awesome_refresh() 2009-04-10 18:02:49 +02:00
dbus.h Plug dbus in the event loop. 2008-06-16 23:51:07 +02:00
draw.c Move the definition of globalconf into a header file 2009-04-10 16:32:42 +02:00
draw.h Added AlignMiddle to alignment_t structure 2009-03-12 11:49:58 +01:00
event.c Move the definition of globalconf into a header file 2009-04-10 16:32:42 +02:00
event.h client_stack(): Only stack windows once per mainloop 2009-04-10 18:15:48 +02:00
ewmh.c Move the definition of globalconf into a header file 2009-04-10 16:32:42 +02:00
ewmh.h ewmh: add support for _NET_DESKTOP_GEOMETRY 2009-02-13 10:57:42 +01:00
hooks.c Move the definition of globalconf into a header file 2009-04-10 16:32:42 +02:00
image.c Move the definition of globalconf into a header file 2009-04-10 16:32:42 +02:00
image.h image: add function to create from argb32 data 2008-09-22 11:11:55 +02:00
key.c Move the definition of globalconf into a header file 2009-04-10 16:32:42 +02:00
key.h client: implements per-client key bindings 2009-01-05 16:59:20 +01:00
keygrabber.c Move the definition of globalconf into a header file 2009-04-10 16:32:42 +02:00
keygrabber.h keygrabber: add stop() method 2008-11-10 17:31:18 +01:00
layout.c Move the definition of globalconf into a header file 2009-04-10 16:32:42 +02:00
layout.h layout: move layout code to Lua 2008-12-14 10:28:21 +01:00
LICENSE chance license to GPLv2 2007-09-12 14:29:51 +02:00
luaa.c Remove the argument to awesome_refresh() 2009-04-10 18:02:49 +02:00
luaa.h awesome-client: remove socket code 2009-04-08 17:56:25 +02:00
Makefile awesome-client: remove socket code 2009-04-08 17:56:25 +02:00
mouse.c Move the definition of globalconf into a header file 2009-04-10 16:32:42 +02:00
mouse.h mouse: add object_under_pointer 2008-12-14 10:28:23 +01:00
mousegrabber.c Move the definition of globalconf into a header file 2009-04-10 16:32:42 +02:00
mousegrabber.h mousegrabber: import 2008-12-12 16:51:41 +01:00
PATCHES update STYLE, add PATCHES 2008-08-30 13:09:15 +02:00
property.c Move the definition of globalconf into a header file 2009-04-10 16:32:42 +02:00
property.h client: store class and instance 2009-04-04 13:54:51 +02:00
README build: set minimum pango version required 2008-12-29 10:16:11 +01:00
screen.c Move the definition of globalconf into a header file 2009-04-10 16:32:42 +02:00
screen.h wibox: merge statusbar and titlebar types 2008-09-22 11:11:56 +02:00
selection.c Remove the argument to awesome_refresh() 2009-04-10 18:02:49 +02:00
selection.h selection: do not use a useless module 2009-01-06 17:02:08 +01:00
spawn.c Move the definition of globalconf into a header file 2009-04-10 16:32:42 +02:00
spawn.h luaa: split spawn() into spawn.c 2009-04-03 13:09:17 +02:00
stack.c Move the definition of globalconf into a header file 2009-04-10 16:32:42 +02:00
stack.h stack: add stack_client_append() 2008-11-12 11:23:28 +01:00
structs.h client_stack(): Only stack windows once per mainloop 2009-04-10 18:15:48 +02:00
STYLE STYLE: add missing semi colon 2008-11-12 14:27:42 +01:00
swindow.c Move the definition of globalconf into a header file 2009-04-10 16:32:42 +02:00
swindow.h client, swindow: switch to a more convient definition of geometry 2008-12-14 10:28:24 +01:00
systray.c Move the definition of globalconf into a header file 2009-04-10 16:32:42 +02:00
systray.h systray: add some cleanup code 2008-09-03 18:03:50 +02:00
tag.c Move the definition of globalconf into a header file 2009-04-10 16:32:42 +02:00
tag.h tag.h: remove extra ; 2009-01-18 10:56:31 +01:00
titlebar.c Move the definition of globalconf into a header file 2009-04-10 16:32:42 +02:00
titlebar.h titlebar: redo the handling "a bit" 2009-03-28 14:36:35 +01:00
wibox.c Move the definition of globalconf into a header file 2009-04-10 16:32:42 +02:00
wibox.h titlebar: redo the handling "a bit" 2009-03-28 14:36:35 +01:00
widget.c Move the definition of globalconf into a header file 2009-04-10 16:32:42 +02:00
widget.h wibox: simplify render proto 2009-01-16 15:26:40 +01:00
window.c Move the definition of globalconf into a header file 2009-04-10 16:32:42 +02:00
window.h client: move window function into window.c 2009-04-07 15:58:09 +02:00

awesome
=======
awesome is a highly configurable, next generation framework window manager for X.

Requirements
------------
In order to build awesome itself, you need header files and libs of:
  - cmake (>= 2.6)
  - Xlib
  - xproto
  - xcb (>= 1.1)
  - xcb-util (>= 0.3)
  - Lua (>= 5.1)
  - cairo built with xcb support
  - pango and pangocairo (>= 1.19.3)
  - libev
  - Imlib2
  - dbus (optional, use -DWITH_DBUS=OFF with cmake to disable)
  - gperf

In order to build the awesome man pages and documentation,
you need these tools:
  - asciidoc
  - xmlto
  - docbook XSL stylesheets
  - luadoc

In order to build the source code reference, you need these tools:
  - doxygen
  - graphviz

Building and installation
-------------------------
After extracting the dist tarball, run:

  make

This will create a build directory, run cmake in it and build awesome.

After the building done, you can type this to install:

  make install # might need root permissions

Running awesome
---------------
You can directly select awesome from your display manager. If not, you can
add the following line to your .xinitrc to start awesome using startx
or to .xsession to start awesome using your display manager:

    exec awesome

In order to connect awesome to a specific display, make sure that
the DISPLAY environment variable is set correctly, e.g.:

    DISPLAY=foo.bar:1 exec awesome

(This will start awesome on display :1 of the host foo.bar.)

Configuration
-------------
The configuration of awesome is done by creating a $XDG_CONFIG_HOME/awesome/rc.lua file.
An example is provided in the sources.

Troubleshooting
---------------
In most systems any message printed by awesome (including warnings and errors)
are written to $HOME/.xsession-errors.

If awesome does not start or the configuration file is not producing the desired
results the user should examine this file to gain insight into the problem.