mirror of https://github.com/debauchee/barrier.git
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
|
||||
CScreenInfo* lastGoodScreen = src;
|
||||
CScreenInfo* dst = getNeighbor(src, srcSide);
|
||||
if (dst == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// get the source screen's size (needed for kRight and kBottom)
|
||||
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)
|
||||
switch (srcSide) {
|
||||
case CConfig::kLeft:
|
||||
while (dst != NULL) {
|
||||
while (dst != NULL && dst != lastGoodScreen) {
|
||||
lastGoodScreen = dst;
|
||||
w = lastGoodScreen->m_width;
|
||||
h = lastGoodScreen->m_height;
|
||||
|
|
Loading…
Reference in New Issue