Fix for cloned displays being considered as multiple displays on Linux

preferencesAboutTextFull
Craig Watson 8 years ago
parent c729d965bc
commit 01e1248a98
  1. 11
      src/core/UBDisplayManager.cpp

@ -120,7 +120,16 @@ int UBDisplayManager::numScreens()
{
if (mUseMultiScreen)
{
return mDesktop->screenCount();
int screenCount = mDesktop->screenCount();
// Some window managers report two screens when the two monitors are in "cloned" mode; this hack ensures
// that we consider this as just one screen.
#ifdef Q_OS_LINUX
if (screenCount > 1
&& (mDesktop->screenNumber(mDesktop->screen(0)) == mDesktop->screenNumber(mDesktop->screen(1))))
return 1;
else
#endif
return screenCount;
}
else
{

Loading…
Cancel
Save