aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/FbWindow.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-05-10 23:11:33 (GMT)
committerfluxgen <fluxgen>2003-05-10 23:11:33 (GMT)
commitc0fa8f2263e8defef0db9c5d4d2d7677dd96cbe3 (patch)
treefabe81392a1925c1d92d52e582f323bfe4e8e33d /src/FbTk/FbWindow.cc
parent39425a676224d14b09d38a95a0e0f12c516c6e8b (diff)
downloadfluxbox-c0fa8f2263e8defef0db9c5d4d2d7677dd96cbe3.zip
fluxbox-c0fa8f2263e8defef0db9c5d4d2d7677dd96cbe3.tar.bz2
minor fix
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() {