Automatically move output screen to secondary screen (untested).

This commit is contained in:
Tats
2016-03-26 19:47:05 -04:00
parent 6d7d5c8b55
commit 61dcef5db1
3 changed files with 19 additions and 6 deletions
+16 -4
View File
@@ -65,10 +65,7 @@ void OutputGLWindow::setFullScreen(bool fullscreen)
{
if (fullscreen)
{
// Check if user is on multiple screen (always pre
int screen = _getPreferredScreen();
//Move window to second screen before fullscreening it.
setGeometry(QApplication::desktop()->screenGeometry(screen));
_updateToPreferredScreen();
#ifdef Q_OS_LINUX
// The problem related to the full screen on linux seems to be resolved with Qt 5.5 on Debian.
// However this still seems to be needed on Ubuntu 15.10.
@@ -84,6 +81,21 @@ void OutputGLWindow::setFullScreen(bool fullscreen)
}
}
void OutputGLWindow::updateScreenCount(int nScreens)
{
Q_UNUSED(nScreens);
// Untested.
_updateToPreferredScreen();
}
void OutputGLWindow::_updateToPreferredScreen()
{
// Check if user is on multiple screen (always pre
int screen = _getPreferredScreen();
//Move window to second screen before fullscreening it.
setGeometry(QApplication::desktop()->screenGeometry(screen));
}
void OutputGLWindow::setDisplayCrosshair(bool crosshair)
{