From bad0725b227a24c9761440a8fef6317a327b3093 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Fri, 13 Jun 2003 20:49:05 +0000 Subject: added autogrouping --- src/Window.cc | 57 ++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 23 deletions(-) diff --git a/src/Window.cc b/src/Window.cc index 61bf3ee..85cadef 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Window.cc,v 1.190 2003/06/12 14:35:36 fluxgen Exp $ +// $Id: Window.cc,v 1.191 2003/06/13 20:49:05 fluxgen Exp $ #include "Window.hh" @@ -292,6 +292,9 @@ FluxboxWindow::FluxboxWindow(Window w, BScreen &scr, FbWinFrameTheme &tm, FluxboxWindow::~FluxboxWindow() { #ifdef DEBUG cerr<<__FILE__<<"("<<__LINE__<<"): starting ~FluxboxWindow("<window(), &ch) == 0) { cerr<<"Failed to read class hint!"<checkGrouping(*this); - } - */ - } - - deiconify(false); + + Workspace *wsp = screen().getWorkspace(m_workspace_number); + // we must be resizable AND maximizable to be autogrouped + //!! TODO: there should be an isGroupable() function + if (wsp != 0 && isResizable() && isMaximizable()) { + destroyed = wsp->checkGrouping(*this); + } + + } + // if we wasn't grouped with another window we deiconify ourself + if (!destroyed) + deiconify(false); - break; + } break; case InactiveState: case ZoomState: default: -- cgit v0.11.2