From c200045e9a5d81a67d98eacffeb6385acdac37e2 Mon Sep 17 00:00:00 2001 From: Mathias Gumz Date: Sat, 19 Mar 2011 15:01:16 +0100 Subject: code deduplication: use RectangleUtil::insideBorder() --- src/Screen.cc | 5 +---- 1 file changed, 1 insertion(+), 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 { #ifdef XINERAMA if (hasXinerama()) { for (int i=0; i < m_xinerama_num_heads; i++) { - if (x >= m_xinerama_headinfo[i].x && - x < (m_xinerama_headinfo[i].x + m_xinerama_headinfo[i].width) && - y >= m_xinerama_headinfo[i].y && - y < (m_xinerama_headinfo[i].y + m_xinerama_headinfo[i].height)) { + if (RectangleUtil::insideBorder(m_xinerama_headinfo[i], x, y, 0)) { return i+1; } } -- cgit v0.11.2