Changeset 26792 in vbox
- Timestamp:
- Feb 25, 2010 1:01:20 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 58059
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/x11/VBoxClient/display.cpp
r26505 r26792 125 125 { 126 126 LogFlowFunc(("\n")); 127 uint32_t cx0 = 0, cy0 = 0, cBits0 = 0, iDisplay0 = 0;128 127 Display *pDisplay = XOpenDisplay(NULL); 129 128 if (pDisplay == NULL) … … 135 134 if (RT_FAILURE(rc)) 136 135 return rc; 137 VbglR3GetDisplayChangeRequest(&cx0, &cy0, &cBits0, &iDisplay0, false);138 136 while (true) 139 137 { … … 146 144 int rc2 = VbglR3GetDisplayChangeRequest(&cx, &cy, &cBits, 147 145 &iDisplay, true); 148 /* Ignore the request if it is stale */ 149 if ((cx != cx0) || (cy != cy0) || RT_FAILURE(rc2)) 150 { 151 /* If we are not stopping, sleep for a bit to avoid using up 152 too much CPU while retrying. */ 153 if (RT_FAILURE(rc2)) 154 RTThreadYield(); 155 else 156 { 157 system("VBoxRandR"); 158 cx0 = cx; 159 cy0 = cy; 160 } 161 } 146 /* If we are not stopping, sleep for a bit to avoid using up 147 too much CPU while retrying. */ 148 if (RT_FAILURE(rc2)) 149 RTThreadYield(); 150 else 151 system("VBoxRandR"); 162 152 } 163 153 if ( RT_SUCCESS(rc)
Note:
See TracChangeset
for help on using the changeset viewer.