fixed bug with switching screens on primary when there's no
link in that direction (it would assert). introduced bug when adding support for wrapping. now ignores attempts to move in a direction with no link.
This commit is contained in:
parent
fba8063c17
commit
88490de5a2
|
@ -890,6 +890,9 @@ CServer::getNeighbor(
|
||||||
// get the first neighbor
|
// get the first neighbor
|
||||||
CScreenInfo* lastGoodScreen = src;
|
CScreenInfo* lastGoodScreen = src;
|
||||||
CScreenInfo* dst = getNeighbor(src, srcSide);
|
CScreenInfo* dst = getNeighbor(src, srcSide);
|
||||||
|
if (dst == NULL) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
// get the source screen's size (needed for kRight and kBottom)
|
// get the source screen's size (needed for kRight and kBottom)
|
||||||
SInt32 w = src->m_width, h = src->m_height;
|
SInt32 w = src->m_width, h = src->m_height;
|
||||||
|
@ -897,7 +900,7 @@ CServer::getNeighbor(
|
||||||
// find destination screen, adjusting x or y (but not both)
|
// find destination screen, adjusting x or y (but not both)
|
||||||
switch (srcSide) {
|
switch (srcSide) {
|
||||||
case CConfig::kLeft:
|
case CConfig::kLeft:
|
||||||
while (dst != NULL) {
|
while (dst != NULL && dst != lastGoodScreen) {
|
||||||
lastGoodScreen = dst;
|
lastGoodScreen = dst;
|
||||||
w = lastGoodScreen->m_width;
|
w = lastGoodScreen->m_width;
|
||||||
h = lastGoodScreen->m_height;
|
h = lastGoodScreen->m_height;
|
||||||
|
|
Loading…
Reference in New Issue