diff options
Diffstat (limited to 'src/FbTk')
-rw-r--r-- | src/FbTk/FbWindow.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/FbTk/FbWindow.cc b/src/FbTk/FbWindow.cc index 8362733..cf2d348 100644 --- a/src/FbTk/FbWindow.cc +++ b/src/FbTk/FbWindow.cc | |||
@@ -64,7 +64,7 @@ FbWindow::FbWindow(const FbWindow& the_copy): | |||
64 | m_width(the_copy.width()), m_height(the_copy.height()), | 64 | m_width(the_copy.width()), m_height(the_copy.height()), |
65 | m_border_width(the_copy.borderWidth()), | 65 | m_border_width(the_copy.borderWidth()), |
66 | m_border_color(the_copy.borderColor()), | 66 | m_border_color(the_copy.borderColor()), |
67 | m_depth(the_copy.depth()), m_destroy(true), | 67 | m_depth(the_copy.depth()), m_destroy(the_copy.m_destroy), |
68 | m_lastbg_color_set(false), m_lastbg_color(0), m_lastbg_pm(0), | 68 | m_lastbg_color_set(false), m_lastbg_color(0), m_lastbg_pm(0), |
69 | m_renderer(the_copy.m_renderer) { | 69 | m_renderer(the_copy.m_renderer) { |
70 | the_copy.m_window = 0; | 70 | the_copy.m_window = 0; |
@@ -413,7 +413,6 @@ void FbWindow::setNew(Window win) { | |||
413 | m_window = win; | 413 | m_window = win; |
414 | 414 | ||
415 | if (m_window != 0) { | 415 | if (m_window != 0) { |
416 | updateGeometry(); | ||
417 | XWindowAttributes attr; | 416 | XWindowAttributes attr; |
418 | attr.screen = 0; | 417 | attr.screen = 0; |
419 | //get screen number | 418 | //get screen number |
@@ -622,16 +621,16 @@ bool FbWindow::updateGeometry() { | |||
622 | return false; | 621 | return false; |
623 | 622 | ||
624 | int old_x = m_x, old_y = m_y; | 623 | int old_x = m_x, old_y = m_y; |
625 | unsigned int old_width = m_width, old_height = m_height; | 624 | unsigned int old_border_width = m_border_width, old_width = m_width, old_height = m_height; |
626 | 625 | ||
627 | Window root; | 626 | Window root; |
628 | unsigned int border_width, depth; | 627 | unsigned int depth; |
629 | if (XGetGeometry(display(), m_window, &root, &m_x, &m_y, | 628 | if (XGetGeometry(display(), m_window, &root, &m_x, &m_y, |
630 | &m_width, &m_height, &border_width, &depth)) | 629 | &m_width, &m_height, &m_border_width, &depth)) |
631 | m_depth = depth; | 630 | m_depth = depth; |
632 | 631 | ||
633 | return (old_x != m_x || old_y != m_y || old_width != m_width || | 632 | return (old_x != m_x || old_y != m_y || old_width != m_width || |
634 | old_height != m_height); | 633 | old_height != m_height || old_border_width != m_border_width); |
635 | } | 634 | } |
636 | 635 | ||
637 | void FbWindow::create(Window parent, int x, int y, | 636 | void FbWindow::create(Window parent, int x, int y, |