diff --git a/tigervnc.changes b/tigervnc.changes index 0fc70ff..91229f8 100644 --- a/tigervnc.changes +++ b/tigervnc.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Oct 13 11:51:03 UTC 2014 - msrb@suse.com + +- u_tigervnc-use_preferred_mode.patch + * Mark user chosen resolution as preferred. (bnc#896540) + ------------------------------------------------------------------- Mon Aug 18 13:58:30 UTC 2014 - sndirsch@suse.com diff --git a/tigervnc.spec b/tigervnc.spec index 80e435f..848ce22 100644 --- a/tigervnc.spec +++ b/tigervnc.spec @@ -112,6 +112,7 @@ Patch7: u_tigervnc-ignore-epipe-on-write.patch Patch8: n_tigervnc-date-time.patch Patch9: U_include-vencrypt-only-if-any-subtype-present.patch Patch10: u_tigervnc-check-shm-harder.patch +Patch11: u_tigervnc-use_preferred_mode.patch # Xserver patches Patch20: tigervnc-1.2.80-fix-int-to-pointer.patch @@ -155,6 +156,7 @@ fi %patch8 -p1 %patch9 -p0 %patch10 -p0 +%patch11 -p0 pushd unix/xserver patch -p1 < ../xserver114.patch diff --git a/u_tigervnc-use_preferred_mode.patch b/u_tigervnc-use_preferred_mode.patch new file mode 100644 index 0000000..64453f7 --- /dev/null +++ b/u_tigervnc-use_preferred_mode.patch @@ -0,0 +1,48 @@ +Author: Michal Srb +Subject: Use preferred mode. +Patch-Mainline: To be upstreamed +References: bnc#896540 + +If there is any resolution specified with -geometry or -screen parameters, +report this resolution as preferred one. That way desktop environments won't +change it immediately after start. +Index: unix/xserver/hw/vnc/xvnc.cc +=================================================================== +--- unix/xserver/hw/vnc/xvnc.cc (revision 5186) ++++ unix/xserver/hw/vnc/xvnc.cc (working copy) +@@ -1319,12 +1319,22 @@ + /* Make sure the CRTC has this output set */ + vncRandRCrtcSet(pScreen, crtc, NULL, 0, 0, RR_Rotate_0, 1, &output); + +- /* Populate a list of default modes */ +- RRModePtr modes[sizeof(vncRandRWidths)/sizeof(*vncRandRWidths)]; +- int num_modes; ++ /* Populate a list of modes */ ++ RRModePtr modes[sizeof(vncRandRWidths)/sizeof(*vncRandRWidths) + 1]; ++ int num_modes = 0; + +- num_modes = 0; ++ /* Start with requested mode */ ++ mode = vncRandRModeGet(pScreen->width, pScreen->height); ++ if(mode != NULL) { ++ modes[num_modes] = mode; ++ num_modes++; ++ } ++ ++ /* Add default modes */ + for (int i = 0;i < sizeof(vncRandRWidths)/sizeof(*vncRandRWidths);i++) { ++ if (vncRandRWidths[i] == pScreen->width && vncRandRHeights[i] == pScreen->height) ++ continue; ++ + mode = vncRandRModeGet(vncRandRWidths[i], vncRandRHeights[i]); + if (mode != NULL) { + modes[num_modes] = mode; +@@ -1332,7 +1342,7 @@ + } + } + +- RROutputSetModes(output, modes, num_modes, 0); ++ RROutputSetModes(output, modes, num_modes, 1); + + return crtc; + }