From eb9bb882ed9fb21c8048a71e41a7a2cedec3f9c3 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Tue, 3 Dec 2002 21:59:58 +0000 Subject: initiate s_display in assignment too --- src/FbTk/FbWindow.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/FbTk/FbWindow.cc b/src/FbTk/FbWindow.cc index d42db25..4a3f66c 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.1 2002/12/03 16:25:27 fluxgen Exp $ +// $Id: FbWindow.cc,v 1.2 2002/12/03 21:59:58 fluxgen Exp $ #include "FbWindow.hh" @@ -33,7 +33,8 @@ namespace FbTk { Display *FbWindow::s_display = 0; FbWindow::FbWindow():m_window(0) { - + if (s_display == 0) + s_display = App::instance()->display(); } FbWindow::FbWindow(int screen_num, @@ -95,7 +96,8 @@ FbWindow &FbWindow::operator = (Window win) { if (m_window != 0) XDestroyWindow(s_display, m_window); m_window = win; - updateGeometry(); + if (m_window != 0) + updateGeometry(); return *this; } -- cgit v0.11.2