diff options
Diffstat (limited to 'src-qt5')
-rw-r--r-- | src-qt5/core/libLumina/LuminaRandR-X11.cpp | 5 | ||||
-rw-r--r-- | src-qt5/core/libLumina/test/main.cpp | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src-qt5/core/libLumina/LuminaRandR-X11.cpp b/src-qt5/core/libLumina/LuminaRandR-X11.cpp index 7b78e63f..edd90afa 100644 --- a/src-qt5/core/libLumina/LuminaRandR-X11.cpp +++ b/src-qt5/core/libLumina/LuminaRandR-X11.cpp @@ -112,6 +112,7 @@ inline xcb_randr_mode_t modeForResolution(QSize res, QList<xcb_randr_mode_t> mod for(int i=0; i<xcb_randr_get_screen_resources_modes_length(srreply); i++){ xcb_randr_mode_info_t minfo = xcb_randr_get_screen_resources_modes(srreply)[i]; if(modes.contains(minfo.id)){ + //qDebug() << "Found mode!" << minfo.id << res << refreshrate; if(res.isNull() && (minfo.width > sz.width() || minfo.height > sz.height()) ){ //No resolution requested - pick the largest one //qDebug() << "Found Bigger Mode:" << sz << QSize(minfo.width, minfo.height); @@ -119,6 +120,7 @@ inline xcb_randr_mode_t modeForResolution(QSize res, QList<xcb_randr_mode_t> mod det_mode = minfo.id; }else if(!res.isNull()){ sz = QSize(minfo.width, minfo.height); + //qDebug() << "Compare Sizes:" << sz << res; if(sz == res && minfo.dot_clock > refreshrate){ det_mode = minfo.id; refreshrate = minfo.dot_clock; } } } @@ -130,7 +132,7 @@ inline xcb_randr_mode_t modeForResolution(QSize res, QList<xcb_randr_mode_t> mod inline bool showOutput(QRect geom, p_objects *p_obj){ //if no geom provided, will add as the right-most screen at optimal resolution - //qDebug() << "Enable Monitor:" << geom; + qDebug() << "Enable Monitor:" << geom; xcb_randr_mode_t mode = modeForResolution(geom.size(), p_obj->modes); if(mode==XCB_NONE){ return false; } //invalid resolution for this monitor //qDebug() << " - Found Mode:" << mode; @@ -157,6 +159,7 @@ inline bool showOutput(QRect geom, p_objects *p_obj){ free(reply); } //qDebug() << " - Using crtc:" << p_obj->crtc; + //qDebug() << " - Using mode:" << mode; xcb_randr_output_t outList[1]{ p_obj->output }; xcb_randr_set_crtc_config_cookie_t cookie = xcb_randr_set_crtc_config_unchecked(QX11Info::connection(), p_obj->crtc, diff --git a/src-qt5/core/libLumina/test/main.cpp b/src-qt5/core/libLumina/test/main.cpp index 20421c36..056f1d28 100644 --- a/src-qt5/core/libLumina/test/main.cpp +++ b/src-qt5/core/libLumina/test/main.cpp @@ -6,7 +6,7 @@ int main(int argc, char** argv){ QString toggle = "HDMI-2"; - QRect toggleGeom(1980,0, 1600,900); + QRect toggleGeom(1920,0, 1920,1080); int toggleOK = -1; //-1: automatic, 0: enable monitor, 1: disable monitor QApplication A(argc, argv); |