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 { ...@@ -164,12 +164,10 @@ macx {
LIBS += -framework CoreMedia LIBS += -framework CoreMedia
LIBS += -lcrypto LIBS += -lcrypto
LIBS += -L/usr/local/opt/openssl/lib LIBS += -L/opt/local/lib
LIBS += -L/usr/local/opt/quazip/lib INCLUDEPATH += /opt/local/include/openssl
LIBS += -L/usr/local/opt/ffmpeg/lib INCLUDEPATH += /opt/local/include
INCLUDEPATH += /usr/local/opt/openssl/include INCLUDEPATH += /opt/local/include/quazip5
INCLUDEPATH += /usr/local/opt/ffmpeg/include
INCLUDEPATH += /usr/local/opt/quazip/include
CONFIG(release, debug|release):CONFIG += x86_64 CONFIG(release, debug|release):CONFIG += x86_64
CONFIG(debug, debug|release):CONFIG += x86_64 CONFIG(debug, debug|release):CONFIG += x86_64
......
...@@ -65,15 +65,18 @@ UBDisplayManager::UBDisplayManager(QObject *parent) ...@@ -65,15 +65,18 @@ UBDisplayManager::UBDisplayManager(QObject *parent)
void UBDisplayManager::initScreenIndexes() void UBDisplayManager::initScreenIndexes()
{ {
int screenCount = numScreens(); int screenCount = numScreens();
int primary = mDesktop->primaryScreen();
QRect prirect = mDesktop->screenGeometry(primary);
int rightofpri = mDesktop->screenNumber(QPoint(prirect.right()+1,prirect.top()));
mScreenIndexesRoles.clear(); mScreenIndexesRoles.clear();
if (screenCount > 0) if (screenCount > 0)
{ {
mControlScreenIndex = mDesktop->primaryScreen(); mControlScreenIndex = primary;
if (screenCount > 1 && UBSettings::settings()->swapControlAndDisplayScreens->get().toBool()) if (screenCount > 1 && UBSettings::settings()->swapControlAndDisplayScreens->get().toBool())
{ {
mControlScreenIndex = mControlScreenIndex^1; mControlScreenIndex = rightofpri;
} }
mScreenIndexesRoles << Control; mScreenIndexesRoles << Control;
...@@ -85,7 +88,7 @@ void UBDisplayManager::initScreenIndexes() ...@@ -85,7 +88,7 @@ void UBDisplayManager::initScreenIndexes()
if (screenCount > 1 && mUseMultiScreen) if (screenCount > 1 && mUseMultiScreen)
{ {
mDisplayScreenIndex = mControlScreenIndex != 0 ? 0 : 1; mDisplayScreenIndex = mControlScreenIndex != primary ? primary : rightofpri;
mScreenIndexesRoles << Display; mScreenIndexesRoles << Display;
} }
else else
...@@ -94,17 +97,16 @@ void UBDisplayManager::initScreenIndexes() ...@@ -94,17 +97,16 @@ void UBDisplayManager::initScreenIndexes()
} }
mPreviousScreenIndexes.clear(); mPreviousScreenIndexes.clear();
/**** DISABLE OTHER SCREENS MASKING
if (screenCount > 2) if (screenCount > 2)
{ {
for(int i = 2; i < screenCount; i++) for(int i = 2; i < screenCount; i++)
{ {
if(mControlScreenIndex == i) if (mControlScreenIndex != i && mDisplayScreenIndex != i)
mPreviousScreenIndexes.append(1);
else
mPreviousScreenIndexes.append(i); mPreviousScreenIndexes.append(i);
} }
} }
****/
} }
void UBDisplayManager::swapDisplayScreens(bool swap) 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