[haiku-development] Stack & Tile for Haiku

  • From: Christof Lutteroth <lutteroth@xxxxxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 14 Jan 2009 20:28:43 +1300

Hello!

I spent the last days working on the Stack & Tile window manager for Haiku (the first student project at the University of Auckland). The result is a rewrite that, although not perfect, seems to work relatively well.

In the prototype from the screencast, the concepts were still in an early stage, and it was not clear how some of the cases of stacking and tiling should be handled. Interestingly, many of the problems could be solved by using the technology from the second student project (the linear programming framework that forms the base of the Auckland Layout Model). As a result, the current Stack & Tile implementation uses the linprog library and its backend, the lp_solve library. Stacking and tiling of windows is expressed in the form of linear constraints, which are solved as the user moves and resizes the windows.

The current backend for solving linear programs, the lp_solve library (which is already part of the Haiku repository), is not perfect. It does not exactly meet our requirements, and it is quite bulky. My colleague and me will probably replace it or at least trim it down at some point. But for now, it does its job.

So for all the adventurous, please feel free to download and apply the following patches, and try out Stack & Tile yourself:
http://www.cs.auckland.ac.nz/~lutteroth/linprog.diff
http://www.cs.auckland.ac.nz/~lutteroth/stack-and-tile.diff

The first patch is an upgrade of the existing linprog library. The second patch extends the app server with Stack & Tile. No new classes have been added to the app server. Nearly all of the Stack & Tile logic is located in class Window.

Now a quick start guide:

All stacking and tiling functionality is activated by pressing the COMMAND key (which is by default the ALT key) and moving or resizing windows so that they are close together. If the COMMAND key is not pressed while moving or resizing windows, then the app server should behave as usual. That is, the functionality does not intrude on the user unless explicitly activated.

Stack windows by COMMAND+dragging the tab of a window onto the tab of another window. The tabs of the windows are highlighted to indicate that they will be stacked.

Tile your windows by snapping them together. This is done by COMMAND+dragging or COMMAND+resizing a window so that its borders are close to the borders of one or more other windows. The borders of the windows are highlighted to indicate that they will be tiled.

Remember that this implementation is quite new and needs to mature. We are still working on the stacking and tiling behavior. Sometimes the linear specification for stacking and tiling has more than one solution, which gives the linear solver a choice. This may appear as seemingly nondeterministic behavior.

We are happy about any feedback.

Cheers,
Christof


Other related posts: