
This file is supposed to describe the design and planned development of the
tiling script. What follows is first a list of the goals of the project and then
design decisions and a coarse description of the design.

Goals:
 * A functional tiling window management extension for kwin
 * Automatic layouts should be supported:
   * Spiral layout (SpiralLayout)
   * Two columns/rows (HalfLayout)
   * Rows only (BladeLayout)
   * Regular grid?
   * ...
 * Different layouts for different desktops/screens
 * A number of different layouts as well as a possibility to disable tiling for
   a certain screen/desktop combination
 * The possibility to make some windows floating (remove them from the layout)
   Both with a keybinding and a menu entry
 * Tab groups should be handled correctly (a complete tab group forms one tile)
 * Individual windows should be resizable and the whole layout should be updated
   accordingly
 * Windows should be selected and moved/resized in the layout and between
   screens and desktops using the keyboard or the mouse
 * Tiled windows should always be drawn below floating ones
   and fullscreen windows should always be on top
 * Window borders can be disabled when being tiled, 
   and can be reactivated per-window with a shortcut
 * Some windows cannot be tiled properly (dialogs, non resizable windows, etc.),
   those should automatically be made floating.
   This can be configured (by window-class currently), and there is one app-specific workaround for steam
   as it doesn't set the window-class or type (dialog etc) properly
 ** Also keep a configurable list with sensible defaults (nobody wants yakuake to float)
 * Multiscreen setups should work correctly
 * Activities are a distant TODO

Design decisions:
 * tiled windows at the bottom, floating windows over that, fullscreen or maximized windows on top (may add options on request)
 * windows that float permanently (because of configuration or type) aren't kept track of in the script - we're not a window manager
 * KWin functionality should not be duplicated, even if it's off by default (e.g. "focus window to the right")

Design description:
 * TileList: KWin doesn't give us any information about tab groups, so we have
   to figure that out ourselves by setting a property and synchronizing it among
   all clients in a tab. This information needs to be kept up-to-date on tab
   group changes as well. The code related to this is in tilelist.js which
   contains a class which keeps track of all tab groups in the system.
   This is where newly opened windows are first added.
 * Tile: Various window signals (resizing, moving, maximizing etc.) have to be
   reacted to, this class binds handlers to these signals and filters them as
   necessary (e.g. intermediate steps in a resize operation are not interesting
   for us).
 * Layout: This is the class which allocated the areas of the different tiles in
   an automatic fashion. It contains functions to get the top/bottom/left/right
   neighbour of a tile which are used when the user wants to move the focus to
   a different tile. The different kinds of layouts are classes derived from
   this class.
   Floating windows are _not_ handled in layouts or tiles.
 * TilingManager: The main class which contains a list of the current layouts (one per
   screen/desktop combination) and which registers global keyboard shortcuts and
   some global events (e.g. screen count changes).
 * Tiling (also referenced as "Layout" in TilingManager): This is essentially one desktop per screen and makes changing layouts at runtime possible
 * There is currently no layout switcher (but it could be implemented in QML).

 The class relationship as cool ASCII-Art:

 	 	   			TilingManager
					/			\
				Tiling			TileList
				/	  \		   /
			Layout       Tile
