aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/FbWindow.cc
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2008-10-15 02:40:33 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2008-10-15 02:40:33 (GMT)
commit9bd64010135e26f97fa4d4d551737847fedfbcdd (patch)
treede54d9641c4923b153d3d79ccc25ac414e22574b /src/FbTk/FbWindow.cc
parent7380a1f8f2292f0cbc00bdb8d2e7fc0ded84f816 (diff)
downloadfluxbox_pavel-9bd64010135e26f97fa4d4d551737847fedfbcdd.zip
fluxbox_pavel-9bd64010135e26f97fa4d4d551737847fedfbcdd.tar.bz2
ignore XRandr events that don't actually change the screen size
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,