Changeset 34918 in vbox for trunk/src/VBox
- Timestamp:
- Dec 9, 2010 6:08:01 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/x11/VBoxClient/display.cpp
r33304 r34918 29 29 #include <iprt/assert.h> 30 30 #include <iprt/err.h> 31 #include <iprt/file.h> 32 #include <iprt/string.h> 31 33 #include <iprt/thread.h> 32 34 #include <VBox/log.h> … … 155 157 Cursor hClockCursor = XCreateFontCursor(pDisplay, XC_watch); 156 158 Cursor hArrowCursor = XCreateFontCursor(pDisplay, XC_left_ptr); 159 int RRMaj, RRMin; 160 if (!XRRQueryVersion(pDisplay, &RRMaj, &RRMin)) 161 RRMin = 0; 162 const char *pcszXrandr = "xrandr"; 163 if (RTFileExists("/usr/X11/bin/xrandr")) 164 pcszXrandr = "/usr/X11/bin/xrandr"; 157 165 int rc = RTThreadCreate(NULL, x11ConnectionMonitor, NULL, 0, 158 166 RTTHREADTYPE_INFREQUENT_POLLER, 0, "X11 monitor"); … … 187 195 RTThreadYield(); 188 196 else 189 setSize(pDisplay, cx, cy); 197 if (RRMin < 2) 198 setSize(pDisplay, cx, cy); 199 else 200 { 201 char szCommand[256]; 202 RTStrPrintf(szCommand, sizeof(szCommand), 203 "%s --output VBOX%u --set VBOX_MODE %dx%d", 204 pcszXrandr, iDisplay, cx, cy); 205 system(szCommand); 206 RTStrPrintf(szCommand, sizeof(szCommand), 207 "%s --output VBOX%u --preferred", 208 pcszXrandr, iDisplay); 209 system(szCommand); 210 } 190 211 } 191 212 }
Note:
See TracChangeset
for help on using the changeset viewer.