aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/libLumina
diff options
context:
space:
mode:
Diffstat (limited to 'src-qt5/core/libLumina')
-rw-r--r--src-qt5/core/libLumina/LuminaRandR-X11.cpp10
-rw-r--r--src-qt5/core/libLumina/LuminaRandR.pri1
-rw-r--r--src-qt5/core/libLumina/test/main.cpp9
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;
}
bgstack15