Bugfix: Store width_factor/height_factor per workspace, not per container

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.
This commit is contained in:
Michael Stapelberg
2009-05-09 17:48:35 +02:00
parent d24e47a0f3
commit 8e1990f058
9 changed files with 325 additions and 235 deletions

View File

@ -173,6 +173,12 @@ struct Workspace {
/* This is a two-dimensional dynamic array of Container-pointers. Ive always wanted
* to be a three-star programmer :) */
Container ***table;
/* width_factor and height_factor contain the amount of space (percentage) a column/row
has of all the space which is available for resized windows. This ensures that
non-resized windows (newly opened, for example) have the same size as always */
float *width_factor;
float *height_factor;
};
/*
@ -298,11 +304,6 @@ struct Container {
/* Width/Height of the container. Changeable by the user */
int width;
int height;
/* width_factor and height_factor contain the amount of space (percentage) a window
has of all the space which is available for resized windows. This ensures that
non-resized windows (newly opened, for example) have the same size as always */
float width_factor;
float height_factor;
/* When in stacking mode, we draw the titlebars of each client onto a separate window */
struct Stack_Window stack_win;