aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-10-26 20:52:28 (GMT)
committerfluxgen <fluxgen>2003-10-26 20:52:28 (GMT)
commite8659c7f1774c7de0965a2fc6a9e5b9680cfbdaa (patch)
tree572df9ea390cf1d8814d478e404aa83b445282a4
parentba28e33344d694ff9bf0360d3e016e2c63745568 (diff)
downloadfluxbox-e8659c7f1774c7de0965a2fc6a9e5b9680cfbdaa.zip
fluxbox-e8659c7f1774c7de0965a2fc6a9e5b9680cfbdaa.tar.bz2
fixed uninitialized variables
-rw-r--r--src/FbTk/FbWindow.cc18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/FbTk/FbWindow.cc b/src/FbTk/FbWindow.cc
index a7fe3f0..a16fbb6 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.27 2003/10/14 21:49:21 fluxgen Exp $ 22// $Id: FbWindow.cc,v 1.28 2003/10/26 20:52:28 fluxgen Exp $
23 23
24#include "FbWindow.hh" 24#include "FbWindow.hh"
25 25
@@ -119,9 +119,16 @@ FbWindow::FbWindow(const FbWindow &parent,
119 119
120FbWindow::FbWindow(Window client):m_parent(0), m_window(0), 120FbWindow::FbWindow(Window client):m_parent(0), m_window(0),
121 m_screen_num(0), 121 m_screen_num(0),
122 m_x(0), m_y(0),
123 m_width(1), m_height(1),
124 m_border_width(0),
125 m_depth(0),
122 m_destroy(false), // don't destroy this window 126 m_destroy(false), // don't destroy this window
123 m_buffer_pm(0) { 127 m_buffer_pm(0) {
124 128
129 if (s_display == 0)
130 s_display = App::instance()->display();
131
125 setNew(client); 132 setNew(client);
126} 133}
127 134
@@ -263,7 +270,9 @@ void FbWindow::setNew(Window win) {
263 270
264 if (m_window != 0 && m_destroy) 271 if (m_window != 0 && m_destroy)
265 XDestroyWindow(s_display, m_window); 272 XDestroyWindow(s_display, m_window);
273
266 m_window = win; 274 m_window = win;
275
267 if (m_window != 0) { 276 if (m_window != 0) {
268 updateGeometry(); 277 updateGeometry();
269 XWindowAttributes attr; 278 XWindowAttributes attr;
@@ -273,7 +282,14 @@ void FbWindow::setNew(Window win) {
273 m_window, 282 m_window,
274 &attr) != 0 && attr.screen != 0) { 283 &attr) != 0 && attr.screen != 0) {
275 m_screen_num = XScreenNumberOfScreen(attr.screen); 284 m_screen_num = XScreenNumberOfScreen(attr.screen);
285 m_width = attr.width;
286 m_height = attr.height ;
287 m_x = attr.x;
288 m_y = attr.y;
289 m_depth = attr.depth;
290 m_border_width = attr.border_width;
276 } 291 }
292
277 } 293 }
278} 294}
279 295