aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/libLumina/test
diff options
context:
space:
mode:
Diffstat (limited to 'src-qt5/core/libLumina/test')
-rw-r--r--src-qt5/core/libLumina/test/main.cpp32
1 files changed, 24 insertions, 8 deletions
diff --git a/src-qt5/core/libLumina/test/main.cpp b/src-qt5/core/libLumina/test/main.cpp
index 5c6fa67f..22f068dd 100644
--- a/src-qt5/core/libLumina/test/main.cpp
+++ b/src-qt5/core/libLumina/test/main.cpp
@@ -11,16 +11,32 @@ int main(int argc, char** argv){
qDebug() << "Detected Information:";
for(int i=0; i<devList.length(); i++){
qDebug() << "["+devList.at(i)->ID()+"]";
- qDebug() << " - isEnabled:" << devList.at(i)->isEnabled();
- qDebug() << " - isPrimary:" << devList.at(i)->isPrimary();
- qDebug() << " - isAutomatic:" << devList.at(i)->isAutomatic();
- qDebug() << " - Current Geometry:" << devList.at(i)->currentGeometry();
- qDebug() << " - Physical Size (mm):" << devList.at(i)->physicalSizeMM();
- qDebug() << " - Available Resolutions:" << devList.at(i)->availableResolutions();
+ qDebug() << " - isConnected:" << devList.at(i)->isConnected();
+ if(devList.at(i)->isConnected()){
+ qDebug() << " - isEnabled:" << devList.at(i)->isEnabled();
+ qDebug() << " - isPrimary:" << devList.at(i)->isPrimary();
+ qDebug() << " - Current Geometry:" << devList.at(i)->currentGeometry();
+ qDebug() << " - Physical Size (mm):" << devList.at(i)->physicalSizeMM();
+ qDebug() << " - Current DPI:" << devList.at(i)->physicalDPI();
+ qDebug() << " - Available Resolutions:" << devList.at(i)->availableResolutions();
+ }
}
- QString disable = "DVI-I-1";
+ /*QString disable = "DVI-I-1";
qDebug() << "Try Disabling Monitor:" << disable;
- devList.disableMonitor(disable);
+ devList.disableMonitor(disable);*/
+
+ QString setprimary = "eDP-1";
+ if(devList.primaryMonitor() != setprimary){
+ qDebug() << "Try setting monitor as primary:" << setprimary;
+ devList.setPrimaryMonitor(setprimary);
+ //Now see if the status changed on X itself
+ for(int i=0; i<devList.length(); i++){
+ if(devList.at(i)->ID() == setprimary){
+ devList.at(i)->updateInfoCache(); //resync with X server info
+ qDebug() << "Successful:" << devList.at(i)->isPrimary();
+ }
+ }
+ }
qDebug() << "Finished Test!";
return 0;
}
bgstack15