f3919e3250
- Updated to tigervnc 1.5.0. - Dropped no longer needed patches: * tigervnc-sf3495623.patch * u_syslog.patch * u_tigervnc-build-with-xserver-1.17.patch - Use encryption everywhere. (fate#318936) - Work with fltk 1.3.2. * N_tigervnc_revert_fltk_1_3_3_requirements.patch OBS-URL: https://build.opensuse.org/request/show/316948 OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/tigervnc?expand=0&rev=58
48 lines
1.6 KiB
Diff
48 lines
1.6 KiB
Diff
Author: Michal Srb <msrb@suse.com>
|
|
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.c
|
|
===================================================================
|
|
--- unix/xserver/hw/vnc/xvnc.c.orig
|
|
+++ unix/xserver/hw/vnc/xvnc.c
|
|
@@ -1296,12 +1296,24 @@ static RRCrtcPtr vncRandRCrtcCreate(Scre
|
|
vncRandRCrtcSet(pScreen, crtc, NULL, 0, 0, RR_Rotate_0, 1, &output);
|
|
|
|
/* Populate a list of default modes */
|
|
- modes = malloc(sizeof(RRModePtr)*sizeof(vncRandRWidths)/sizeof(*vncRandRWidths));
|
|
+ modes = malloc(sizeof(RRModePtr)*sizeof(vncRandRWidths)/sizeof(*vncRandRWidths) + 1);
|
|
if (modes == NULL)
|
|
return NULL;
|
|
|
|
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 (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;
|
|
@@ -1309,7 +1321,7 @@ static RRCrtcPtr vncRandRCrtcCreate(Scre
|
|
}
|
|
}
|
|
|
|
- RROutputSetModes(output, modes, num_modes, 0);
|
|
+ RROutputSetModes(output, modes, num_modes, 1);
|
|
|
|
free(modes);
|
|
|