From e81b9d6a722b45f8895e70aa108ba4f879b48572 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Tue, 14 May 2002 00:47:16 +0000 Subject: fix for changing window buttons order. destroy them properly when they no longer exist and recreate them if they dont exist yet --- src/Workspace.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Workspace.cc') diff --git a/src/Workspace.cc b/src/Workspace.cc index d42f6c2d..5982f878 100644 --- a/src/Workspace.cc +++ b/src/Workspace.cc @@ -86,8 +86,6 @@ Workspace::~Workspace(void) { const int Workspace::addWindow(OpenboxWindow *w, Bool place) { if (! w) return -1; - if (place) placeWindow(*w); - w->setWorkspace(id); w->setWindowNumber(_windows.size()); @@ -101,6 +99,8 @@ const int Workspace::addWindow(OpenboxWindow *w, Bool place) { raiseWindow(w); + if (place) placeWindow(*w); + return w->getWindowNumber(); } -- cgit v1.2.3