diff options
author | Ken Moore <ken@ixsystems.com> | 2017-06-22 11:57:56 -0400 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2017-06-22 11:57:56 -0400 |
commit | 43278a8123a1b5b5a187275c5bb7ef35a05c06b0 (patch) | |
tree | 09cb0c44fe70509de25784c7d298025d9e98e262 /src-qt5 | |
parent | Add enable/disable functionality to LuminaRandR (untested) (diff) | |
download | lumina-43278a8123a1b5b5a187275c5bb7ef35a05c06b0.tar.gz lumina-43278a8123a1b5b5a187275c5bb7ef35a05c06b0.tar.bz2 lumina-43278a8123a1b5b5a187275c5bb7ef35a05c06b0.zip |
Test the connected but not-enabled monitor probing functionality (minor tweak to adjust the routine), and test/confirm that the "disable" monitor routine works beautifully.
Diffstat (limited to 'src-qt5')
-rw-r--r-- | src-qt5/core/libLumina/LuminaRandR-X11.cpp | 10 | ||||
-rw-r--r-- | src-qt5/core/libLumina/LuminaRandR.pri | 1 | ||||
-rw-r--r-- | src-qt5/core/libLumina/test/main.cpp | 9 |
3 files changed, 10 insertions, 10 deletions
diff --git a/src-qt5/core/libLumina/LuminaRandR-X11.cpp b/src-qt5/core/libLumina/LuminaRandR-X11.cpp index 4c1d5de3..a78821db 100644 --- a/src-qt5/core/libLumina/LuminaRandR-X11.cpp +++ b/src-qt5/core/libLumina/LuminaRandR-X11.cpp @@ -62,11 +62,11 @@ inline bool loadScreenInfo(p_objects *p_obj){ xcb_randr_get_crtc_info_reply_t *cinfo = xcb_randr_get_crtc_info_reply(QX11Info::connection(), xcb_randr_get_crtc_info_unchecked(QX11Info::connection(), p_obj->crtc, QX11Info::appTime()), NULL); - if(cinfo==0){ return false; } - p_obj->geometry = QRect(cinfo->x, cinfo->y, cinfo->width, cinfo->height); - p_obj->current_mode = cinfo->mode; - - free(cinfo); //done with crtc_info + if(cinfo!=0){ + p_obj->geometry = QRect(cinfo->x, cinfo->y, cinfo->width, cinfo->height); + p_obj->current_mode = cinfo->mode; + free(cinfo); //done with crtc_info + } if(!p_obj->modes.isEmpty()){ //And see if this output is currently the primary output diff --git a/src-qt5/core/libLumina/LuminaRandR.pri b/src-qt5/core/libLumina/LuminaRandR.pri index 1e55b37f..0a633b65 100644 --- a/src-qt5/core/libLumina/LuminaRandR.pri +++ b/src-qt5/core/libLumina/LuminaRandR.pri @@ -4,7 +4,6 @@ QT *= x11extras #X11/XCB includes LIBS *= -lxcb -lxcb-randr -#LIBS *= -lXrandr SOURCES *= $${PWD}/LuminaRandR-X11.cpp diff --git a/src-qt5/core/libLumina/test/main.cpp b/src-qt5/core/libLumina/test/main.cpp index 22f068dd..8f809b24 100644 --- a/src-qt5/core/libLumina/test/main.cpp +++ b/src-qt5/core/libLumina/test/main.cpp @@ -21,11 +21,11 @@ int main(int argc, char** argv){ qDebug() << " - Available Resolutions:" << devList.at(i)->availableResolutions(); } } - /*QString disable = "DVI-I-1"; + /*QString disable = "HDMI-2"; qDebug() << "Try Disabling Monitor:" << disable; devList.disableMonitor(disable);*/ - QString setprimary = "eDP-1"; + /*QString setprimary = "eDP-1"; if(devList.primaryMonitor() != setprimary){ qDebug() << "Try setting monitor as primary:" << setprimary; devList.setPrimaryMonitor(setprimary); @@ -36,7 +36,8 @@ int main(int argc, char** argv){ qDebug() << "Successful:" << devList.at(i)->isPrimary(); } } - } - qDebug() << "Finished Test!"; + }*/ + + qDebug() << "[ Finished Test! ]"; return 0; } |