This implements ticket #42.
Syntax is "set $key value". All further instances of $key will be
replaced with value before parsing each line of the configfile.
Instead of building arrays of colorpixels we can simply use a pointer
to a struct Colortriple. Furthermore, by getting the colorpixels when
loading the configuration, we save a lot of function calls in the
main code.
Details which are missing: A command to hide/show all floating clients,
moving/resizing clients with your mouse holding Mod1 (click anywhere
in the client, not just on its borders), resize/move by keyboard, select
next/previous client by keyboard
This is a relatively big change, however all cases should be handled by
now.
Because the function to do graphical resizing got rather large, I’ve created
a new file src/resize.c for it.
This fixes ticket #35.
When you disable a Xinerama screen (think of removing a video projector),
the workspaces of that screen need to be re-assigned to another screen.
Previously, the clients affected by this re-assignment did not get re-
configured, which made them appear on the next screen which got configured
at the position of the old one again if you did not switch to the reassigned
workspace before.
So, to reproduce it:
xrandr --output VGA --mode 1280x1024 --right-of LVDS
move windows to the new workspace
xrandr --output VGA --off
xrandr --output VGA --mode 1280x1024 --right-of LVDS
This fixes ticket #36
Thanks to psychoschlumpf for the hint. Having comments in the headers
makes it easier to get the big picture when not being interested in the
source.
The doxygen file extracts as much as it can into HTML files. Please note
that this is not official/supported documentation, but rather being nice
to people who have to/want to use doxygen (I don’t).
Let me paste the header of the doxygen file:
You can use this file with doxygen to create a pseudo-documentation
automatically from source. doxygen-comments are not used very extensively
in i3, mostly for the reason that it clutters the source code and has no
real use (doxygen’s output looks really ugly).
So, if you want to use it, here you go. This is however not a supported
document, and I recommend you have a look at the docs/ folder or at
http://i3.zekjur.net/ for more, real documentation.
There was a race condition when mapping a window and not setting the event mask
before. Therefore, the ReparentNotify and (more important) the UnmapNotify generated
by reparenting were not received, thus leaving the awaiting_useless_unmap variable
of the client "true". To just make it work, in previous commits the DestroyNotify
handler was introduced. Fortunately, with fixing this race condition by first
setting the event mask and mapping the window afterwards, we can remove this handler.
As for the dock windows, there were quite some occurences were client->container
was used without checking if the client is inside a container at all.
Furthermore, the client’s strut containing the space to reserve at the screen edge
is now checked and the desired height is set to the window’s height if the strut
contains 0 or if no strut was specified at all.
By specifying XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT, the window manager
will get map request events instead of map notify events, and therefore
can act sooner (the window won’t be positioned on the screen and moved
afterwards).
Furthermore, this fixes some problems with GIMP/VLC (and probably others)
which caused endless loops.
Also, events which should be ignored are now saved in a queue rather than
saving just the last event. This should eliminate race conditions.
Note that there is a new FIXME in src/handlers.c. Some windows generate
unmap notify events when reparenting while others don’t. We need to
understand, document and implement a more correct way to handle this.