summaryrefslogtreecommitdiff
path: root/src/FbTk/FbWindow.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk/FbWindow.cc')
-rw-r--r--src/FbTk/FbWindow.cc13
1 files changed, 9 insertions, 4 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 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: FbWindow.cc,v 1.15 2003/05/10 13:26:37 fluxgen Exp $ 22// $Id: FbWindow.cc,v 1.16 2003/05/10 23:11:33 fluxgen Exp $
23 23
24#include "FbWindow.hh" 24#include "FbWindow.hh"
25#include "EventManager.hh" 25#include "EventManager.hh"
@@ -71,7 +71,8 @@ FbWindow::FbWindow(const FbWindow &parent,
71 71
72FbWindow::FbWindow(Window client):m_parent(0), m_window(0), 72FbWindow::FbWindow(Window client):m_parent(0), m_window(0),
73 m_destroy(false) { // don't destroy this window 73 m_destroy(false) { // don't destroy this window
74 *this = client; 74
75 setNew(client);
75} 76}
76 77
77FbWindow::~FbWindow() { 78FbWindow::~FbWindow() {
@@ -114,6 +115,11 @@ void FbWindow::clear() {
114} 115}
115 116
116FbWindow &FbWindow::operator = (Window win) { 117FbWindow &FbWindow::operator = (Window win) {
118 setNew(win);
119 return *this;
120}
121
122void FbWindow::setNew(Window win) {
117 if (m_window != 0 && m_destroy) 123 if (m_window != 0 && m_destroy)
118 XDestroyWindow(s_display, m_window); 124 XDestroyWindow(s_display, m_window);
119 m_window = win; 125 m_window = win;
@@ -127,8 +133,7 @@ FbWindow &FbWindow::operator = (Window win) {
127 &attr) != 0 && attr.screen != 0) { 133 &attr) != 0 && attr.screen != 0) {
128 m_screen_num = XScreenNumberOfScreen(attr.screen); 134 m_screen_num = XScreenNumberOfScreen(attr.screen);
129 } 135 }
130 } 136 }
131 return *this;
132} 137}
133 138
134void FbWindow::show() { 139void FbWindow::show() {