summaryrefslogtreecommitdiffstats
path: root/src/widget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widget.cpp')
-rw-r--r--src/widget.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/widget.cpp b/src/widget.cpp
index 887249f..05a8dcb 100644
--- a/src/widget.cpp
+++ b/src/widget.cpp
@@ -13,7 +13,7 @@
#include "math.h"
//______________________________________________________________________________
-Widget::Widget(QWidget *parent) :
+Widget::Widget(bool testMode, QWidget *parent) :
QWidget(parent),
_ui(new Ui::Widget)
{
@@ -28,6 +28,12 @@ Widget::Widget(QWidget *parent) :
// Get the information about the X elements
updateScreenResources();
+ if (testMode) {
+ while (_connectedOutputList.size() > 2) {
+ _connectedOutputList.pop_front();
+ }
+ }
+
switch ( _connectedOutputList.size() ){
/*************************************************************************/
case 1:// In case of one connected output - xrandr --auto
@@ -39,7 +45,7 @@ Widget::Widget(QWidget *parent) :
qDebug() << "Two connected outputs";
// Check if we are in clone mode
- if (cloneMode()) {
+ if (testMode || cloneMode()) {
qDebug() << "Dual output with cloned screen!";