From c0fa8f2263e8defef0db9c5d4d2d7677dd96cbe3 Mon Sep 17 00:00:00 2001
From: fluxgen <fluxgen>
Date: Sat, 10 May 2003 23:11:33 +0000
Subject: minor fix

---
 src/FbTk/FbWindow.cc | 13 +++++++++----
 src/FbTk/FbWindow.hh |  5 ++++-
 2 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/src/FbTk/FbWindow.cc b/src/FbTk/FbWindow.cc
index 9b2b976..603fcd0 100644
--- a/src/FbTk/FbWindow.cc
+++ b/src/FbTk/FbWindow.cc
@@ -19,7 +19,7 @@
 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 // DEALINGS IN THE SOFTWARE.
 
-// $Id: FbWindow.cc,v 1.15 2003/05/10 13:26:37 fluxgen Exp $
+// $Id: FbWindow.cc,v 1.16 2003/05/10 23:11:33 fluxgen Exp $
 
 #include "FbWindow.hh"
 #include "EventManager.hh"
@@ -71,7 +71,8 @@ FbWindow::FbWindow(const FbWindow &parent,
 
 FbWindow::FbWindow(Window client):m_parent(0), m_window(0),
                                   m_destroy(false) { // don't destroy this window
-    *this = client;
+
+    setNew(client);
 }
 
 FbWindow::~FbWindow() {
@@ -114,6 +115,11 @@ void FbWindow::clear() {
 }
 
 FbWindow &FbWindow::operator = (Window win) {
+    setNew(win);	
+    return *this;
+}
+
+void FbWindow::setNew(Window win) {
     if (m_window != 0 && m_destroy)
         XDestroyWindow(s_display, m_window);
     m_window = win;
@@ -127,8 +133,7 @@ FbWindow &FbWindow::operator = (Window win) {
                                  &attr) != 0 && attr.screen != 0) {
             m_screen_num = XScreenNumberOfScreen(attr.screen);
         }
-    }	
-    return *this;
+    }
 }
 
 void FbWindow::show() {
diff --git a/src/FbTk/FbWindow.hh b/src/FbTk/FbWindow.hh
index ea79286..68732e8 100644
--- a/src/FbTk/FbWindow.hh
+++ b/src/FbTk/FbWindow.hh
@@ -19,7 +19,7 @@
 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 // DEALINGS IN THE SOFTWARE.
 
-// $Id: FbWindow.hh,v 1.13 2003/05/10 13:24:59 fluxgen Exp $
+// $Id: FbWindow.hh,v 1.14 2003/05/10 23:11:08 fluxgen Exp $
 
 #ifndef FBTK_FBWINDOW_HH
 #define FBTK_FBWINDOW_HH
@@ -110,6 +110,9 @@ protected:
     explicit FbWindow(Window client);
 
 private:
+    // sets new window and destroys old
+    void setNew(Window win);
+
     void updateGeometry();
     void create(Window parent, int x, int y, unsigned int width, unsigned int height,
                 long eventmask, 
-- 
cgit v0.11.2