Besides making these functions much nicer to use, this fixes a number of
things:
- Clients now don't have to free the returned structures.
- The ScreenInfo allocated by XineramaQueryScreens should be freed with XFree,
not p_delete.
This patch also introduces an abstract Area type that will be very useful.
The tags member of screen is no longer an array but a linked list, thus
tags[0] (used in config.c) is ok since tags points to the first tag
struct, but tags[i], i>0 is wrong. There is one such use in
handle_event_buttonpress, causing awesome to segfault when pressing with
the mouse on the statusbar. The attached patch fixes this.
The big change here is that we now keep our configuration structure in a global
variable called globalconf. This radically simplifies many interfaces, since
passing awesomeconf everywhere is no longer necessary. There are also more
subtle interface effects - now we can reliably identify a screen from just a
screen ID, rather than an awesomeconf, screenid tuple.
Overall, this patch makes most of the interfaces in awesome much nicer to use -
enjoy!
Yes, this is a huge patch, but since a lot of the refactoring was done
systematically using vim macros, splitting this up would have been very hard.
This is a big patch that does not change any behaviour. We abstract the data
needed by the draw.c functions into a context object, and pass that around
instead of passing each argument every time. This results in a much cleaner API
- most functions lose 3-4 arguments.
This is a preparatory patch for further work on statusbar.
I was having this annoying issue with multi-head setups on d9b49f5,
where new clients would always get mapped to the same screen (leftmost).
It seems that the x and y coordinate in the XWindowAttributes of new
clients are set to 0,0. The attached patch ignores these values and uses
the coordinates of the mouse pointer instead.