cosmetic
This commit is contained in:
parent
b3361eae02
commit
35f17d22b5
1 changed files with 13 additions and 11 deletions
|
@ -1961,6 +1961,7 @@ void BScreen::initXinerama() {
|
|||
|
||||
if (m_xinerama_headinfo)
|
||||
delete [] m_xinerama_headinfo;
|
||||
|
||||
m_xinerama_headinfo = new XineramaHeadInfo[number];
|
||||
m_xinerama_num_heads = number;
|
||||
for (int i=0; i < number; i++) {
|
||||
|
@ -1974,7 +1975,8 @@ void BScreen::initXinerama() {
|
|||
fbdbg<<"BScreen::initXinerama(): number of heads ="<<number<<endl;
|
||||
|
||||
/* Reallocate to the new number of heads. */
|
||||
int ha_num = numHeads() ? numHeads() : 1, ha_oldnum = m_head_areas.size();
|
||||
int ha_num = numHeads() ? numHeads() : 1;
|
||||
int ha_oldnum = m_head_areas.size();
|
||||
if (ha_num > ha_oldnum) {
|
||||
m_head_areas.resize(ha_num);
|
||||
for (int i = ha_oldnum; i < ha_num; i++)
|
||||
|
@ -2012,9 +2014,9 @@ void BScreen::clearHeads() {
|
|||
}
|
||||
|
||||
int BScreen::getHead(int x, int y) const {
|
||||
if (!hasXinerama()) return 0;
|
||||
#ifdef XINERAMA
|
||||
|
||||
#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) &&
|
||||
|
@ -2023,7 +2025,7 @@ int BScreen::getHead(int x, int y) const {
|
|||
return i+1;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
#endif // XINERAMA
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue