code deduplication: use RectangleUtil::insideBorder()

This commit is contained in:
Mathias Gumz 2011-03-19 15:01:16 +01:00
parent 767afd32f3
commit c200045e9a

View file

@ -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;
}
}