aboutsummaryrefslogtreecommitdiff
path: root/src/Screen.cc
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2011-03-19 14:01:16 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2011-03-19 14:01:16 (GMT)
commitc200045e9a5d81a67d98eacffeb6385acdac37e2 (patch)
treee5747f6ad885a591e58dae1c726e8cb6e1e4a51d /src/Screen.cc
parent767afd32f3903be52a40ed1d41490b2dd4e5af1c (diff)
downloadfluxbox-c200045e9a5d81a67d98eacffeb6385acdac37e2.zip
fluxbox-c200045e9a5d81a67d98eacffeb6385acdac37e2.tar.bz2
code deduplication: use RectangleUtil::insideBorder()
Diffstat (limited to 'src/Screen.cc')
-rw-r--r--src/Screen.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index d3df049..e54b328 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -2004,10 +2004,7 @@ int BScreen::getHead(int x, int y) const {
2004#ifdef XINERAMA 2004#ifdef XINERAMA
2005 if (hasXinerama()) { 2005 if (hasXinerama()) {
2006 for (int i=0; i < m_xinerama_num_heads; i++) { 2006 for (int i=0; i < m_xinerama_num_heads; i++) {
2007 if (x >= m_xinerama_headinfo[i].x && 2007 if (RectangleUtil::insideBorder(m_xinerama_headinfo[i], x, y, 0)) {
2008 x < (m_xinerama_headinfo[i].x + m_xinerama_headinfo[i].width) &&
2009 y >= m_xinerama_headinfo[i].y &&
2010 y < (m_xinerama_headinfo[i].y + m_xinerama_headinfo[i].height)) {
2011 return i+1; 2008 return i+1;
2012 } 2009 }
2013 } 2010 }