X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2FWorkspace.h;h=c2b920918793bfbc11e99b7c1e8f74bf8f9f05c8;hb=e75d3560a621976eee5413d3583c14c294fbeab6;hp=f9700bdce74907d9b9dd26c419b559ea498ad180;hpb=dfc5f034581f5a26cba5c4811500438f89f0634a;p=chaz%2Fopenbox diff --git a/src/Workspace.h b/src/Workspace.h index f9700bdc..c2b92091 100644 --- a/src/Workspace.h +++ b/src/Workspace.h @@ -26,6 +26,7 @@ #include #include "LinkedList.h" +#include "Geometry.h" class BScreen; class Clientmenu; @@ -34,7 +35,7 @@ class OpenboxWindow; class Workspace { private: - BScreen *screen; + BScreen &screen; OpenboxWindow *lastfocus; Clientmenu *clientmenu; @@ -46,13 +47,16 @@ private: protected: void placeWindow(OpenboxWindow *); - + Point *bestFitPlacement(const Size &win_size, const Rect &space); + Point *rowSmartPlacement(const Size &win_size, const Rect &space); + Point *colSmartPlacement(const Size &win_size, const Rect &space); + Point *const cascadePlacement(const OpenboxWindow* window); public: - Workspace(BScreen *, int = 0); + Workspace(BScreen &, int = 0); ~Workspace(void); - inline BScreen *getScreen(void) { return screen; } + inline BScreen &getScreen(void) { return screen; } inline OpenboxWindow *getLastFocusedWindow(void) { return lastfocus; }