aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk
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
parent39425a676224d14b09d38a95a0e0f12c516c6e8b (diff)
downloadfluxbox_paul-c0fa8f2263e8defef0db9c5d4d2d7677dd96cbe3.zip
fluxbox_paul-c0fa8f2263e8defef0db9c5d4d2d7677dd96cbe3.tar.bz2
minor fix
Diffstat (limited to 'src/FbTk')
-rw-r--r--src/FbTk/FbWindow.cc13
-rw-r--r--src/FbTk/FbWindow.hh5
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 @@
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() {
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 @@
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.hh,v 1.13 2003/05/10 13:24:59 fluxgen Exp $ 22// $Id: FbWindow.hh,v 1.14 2003/05/10 23:11:08 fluxgen Exp $
23 23
24#ifndef FBTK_FBWINDOW_HH 24#ifndef FBTK_FBWINDOW_HH
25#define FBTK_FBWINDOW_HH 25#define FBTK_FBWINDOW_HH
@@ -110,6 +110,9 @@ protected:
110 explicit FbWindow(Window client); 110 explicit FbWindow(Window client);
111 111
112private: 112private:
113 // sets new window and destroys old
114 void setNew(Window win);
115
113 void updateGeometry(); 116 void updateGeometry();
114 void create(Window parent, int x, int y, unsigned int width, unsigned int height, 117 void create(Window parent, int x, int y, unsigned int width, unsigned int height,
115 long eventmask, 118 long eventmask,