aboutsummaryrefslogtreecommitdiff
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 56f354b..2ef24fa 100644
--- a/src/FbTk/FbWindow.cc
+++ b/src/FbTk/FbWindow.cc
@@ -583,16 +583,21 @@ void FbWindow::setOpaque(unsigned char alpha) {
583#endif // HAVE_XRENDER 583#endif // HAVE_XRENDER
584} 584}
585 585
586void FbWindow::updateGeometry() { 586bool FbWindow::updateGeometry() {
587 if (m_window == 0) 587 if (m_window == 0)
588 return; 588 return false;
589
590 int old_x = m_x, old_y = m_y;
591 unsigned int old_width = m_width, old_height = m_height;
589 592
590 Window root; 593 Window root;
591 unsigned int border_width, depth; 594 unsigned int border_width, depth;
592 if (XGetGeometry(display(), m_window, &root, &m_x, &m_y, 595 if (XGetGeometry(display(), m_window, &root, &m_x, &m_y,
593 (unsigned int *)&m_width, (unsigned int *)&m_height, 596 &m_width, &m_height, &border_width, &depth))
594 &border_width, &depth))
595 m_depth = depth; 597 m_depth = depth;
598
599 return (old_x != m_x || old_y != m_y || old_width != m_width ||
600 old_height != m_height);
596} 601}
597 602
598void FbWindow::create(Window parent, int x, int y, 603void FbWindow::create(Window parent, int x, int y,