Commit 0df54bd2 authored by Nicolas Ollinger's avatar Nicolas Ollinger

Gestion plus fine des deux écrans de control et display

parent 85eb094e
......@@ -164,12 +164,10 @@ macx {
LIBS += -framework CoreMedia
LIBS += -lcrypto
LIBS += -L/usr/local/opt/openssl/lib
LIBS += -L/usr/local/opt/quazip/lib
LIBS += -L/usr/local/opt/ffmpeg/lib
INCLUDEPATH += /usr/local/opt/openssl/include
INCLUDEPATH += /usr/local/opt/ffmpeg/include
INCLUDEPATH += /usr/local/opt/quazip/include
LIBS += -L/opt/local/lib
INCLUDEPATH += /opt/local/include/openssl
INCLUDEPATH += /opt/local/include
INCLUDEPATH += /opt/local/include/quazip5
CONFIG(release, debug|release):CONFIG += x86_64
CONFIG(debug, debug|release):CONFIG += x86_64
......
......@@ -65,15 +65,18 @@ UBDisplayManager::UBDisplayManager(QObject *parent)
void UBDisplayManager::initScreenIndexes()
{
int screenCount = numScreens();
int primary = mDesktop->primaryScreen();
QRect prirect = mDesktop->screenGeometry(primary);
int rightofpri = mDesktop->screenNumber(QPoint(prirect.right()+1,prirect.top()));
mScreenIndexesRoles.clear();
if (screenCount > 0)
{
mControlScreenIndex = mDesktop->primaryScreen();
mControlScreenIndex = primary;
if (screenCount > 1 && UBSettings::settings()->swapControlAndDisplayScreens->get().toBool())
{
mControlScreenIndex = mControlScreenIndex^1;
mControlScreenIndex = rightofpri;
}
mScreenIndexesRoles << Control;
......@@ -85,7 +88,7 @@ void UBDisplayManager::initScreenIndexes()
if (screenCount > 1 && mUseMultiScreen)
{
mDisplayScreenIndex = mControlScreenIndex != 0 ? 0 : 1;
mDisplayScreenIndex = mControlScreenIndex != primary ? primary : rightofpri;
mScreenIndexesRoles << Display;
}
else
......@@ -94,17 +97,16 @@ void UBDisplayManager::initScreenIndexes()
}
mPreviousScreenIndexes.clear();
/**** DISABLE OTHER SCREENS MASKING
if (screenCount > 2)
{
for(int i = 2; i < screenCount; i++)
{
if(mControlScreenIndex == i)
mPreviousScreenIndexes.append(1);
else
if (mControlScreenIndex != i && mDisplayScreenIndex != i)
mPreviousScreenIndexes.append(i);
}
}
****/
}
void UBDisplayManager::swapDisplayScreens(bool swap)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment