Changeset 84025 in vbox for trunk/src/VBox/Additions/x11/VBoxClient
- Timestamp:
- Apr 28, 2020 6:27:44 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/x11/VBoxClient/display-svga-x11.cpp
r83935 r84025 46 46 #include <stdio.h> 47 47 #include <dlfcn.h> 48 /** For sleep(..) */ 49 #include <unistd.h> 48 50 #include "VBoxClient.h" 49 51 … … 204 206 * out of horizontal and vertical resolutions. Replicated here to avoid further 205 207 * dependencies. */ 206 DisplayModeR f86CVTMode(int HDisplay, int VDisplay, float VRefresh , Bool Reduced,208 DisplayModeR f86CVTMode(int HDisplay, int VDisplay, float VRefresh /* Herz */, Bool Reduced, 207 209 Bool Interlaced) 208 210 { … … 923 925 unsigned int iYRes = 0; 924 926 /* Don't care about the output positions for now. */ 925 for (int i = 0; i < VMW_MAX_HEADS; ++i)927 for (int i = 0; i < x11Context.hOutputCount; ++i) 926 928 { 927 929 if (!paOutputs[i].fEnabled) … … 1173 1175 configureOutput(i, paOutputs); 1174 1176 } 1175 1177 XSync(x11Context.pDisplay, False); 1178 #ifdef WITH_DISTRO_XRAND_XINERAMA 1179 XRRFreeScreenResources(x11Context.pScreenResources); 1180 #else 1181 if (x11Context.pXRRFreeScreenResources) 1182 x11Context.pXRRFreeScreenResources(x11Context.pScreenResources); 1183 #endif 1176 1184 XUngrabServer(x11Context.pDisplay); 1177 1185 XFlush(x11Context.pDisplay); 1178 1179 #ifdef WITH_DISTRO_XRAND_XINERAMA1180 XRRFreeScreenResources(x11Context.pScreenResources);1181 #else1182 if (x11Context.pXRRFreeScreenResources)1183 x11Context.pXRRFreeScreenResources(x11Context.pScreenResources);1184 #endif1185 1186 1186 } 1187 1187 … … 1204 1204 * e.g. from before a guest reboot. */ 1205 1205 bool fAck = false; 1206 1206 bool fFirstRun = true; 1207 1207 if (!init()) 1208 1208 return VINF_SUCCESS; … … 1266 1266 } 1267 1267 setXrandrTopology(aOutputs); 1268 /* Wait for some seconds and set toplogy again after the boot. In some desktop environments (cinnamon) where 1269 DE get into our resizing our first resize is reverted by the DE. Sleeping for some secs. helps. Setting 1270 topology a 2nd time resolves the black screen I get after resizing.*/ 1271 if (fFirstRun) 1272 { 1273 sleep(4); 1274 setXrandrTopology(aOutputs); 1275 fFirstRun = false; 1276 } 1268 1277 } 1269 1278 do
Note:
See TracChangeset
for help on using the changeset viewer.