Changeset 50662 in vbox
- Timestamp:
- Mar 3, 2014 10:14:58 AM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 92593
- Location:
- trunk/src/VBox/Additions/x11/vboxvideo
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/x11/vboxvideo/undefined
r49696 r50662 1 ChangeWindowProperty 2 DeleteProperty 1 3 DRI2CloseScreen 2 4 DRI2ScreenInit … … 19 21 ShadowFBInit2 20 22 VErrorF 23 WindowTable 21 24 XNFcalloc 22 25 XNFstrdup … … 97 100 resVgaShared 98 101 screenInfo 102 serverClient 99 103 serverGeneration 100 104 setenv -
trunk/src/VBox/Additions/x11/vboxvideo/vboxvideo.c
r50569 r50662 101 101 # include "xf86Crtc.h" 102 102 # include "xf86Modes.h" 103 # include <X11/Xatom.h> 104 #endif 103 #endif 104 105 /* For setting the root window property. */ 106 #include <X11/Xatom.h> 107 #include "property.h" 105 108 106 109 #ifdef VBOX_DRI … … 666 669 # define SCRNINDEXAPI(pfn) pfn 667 670 #endif /* XF86_SCRN_INTERFACE */ 671 672 /** Helper to work round different ways of getting the root window in different 673 * server versions. */ 674 #if defined(XORG_VERSION_CURRENT) && XORG_VERSION_CURRENT < 700000000 \ 675 && XORG_VERSION_CURRENT >= 100900000 676 # define ROOT_WINDOW(pScrn) xf86ScrnToScreen(pScrn)->root 677 #else 678 # define ROOT_WINDOW(pScrn) WindowTable[xf86ScrnToScreen(pScrn)->myNum] 679 #endif 680 681 /** Helper to work round different prototypes for DeleteProperty in different 682 * server versions. */ 683 #if defined(XORG_VERSION_CURRENT) && XORG_VERSION_CURRENT < 700000000 \ 684 && XORG_VERSION_CURRENT >= 100500000 685 # define DELETE_PROPERTY(client, window, prop) \ 686 DeleteProperty(client, window, prop) 687 #else 688 # define DELETE_PROPERTY(client, window, prop) \ 689 DeleteProperty(window, prop) 690 #endif 668 691 669 692 static void setScreenFunctions(ScrnInfoPtr pScrn, xf86ProbeProc pfnProbe) … … 1181 1204 } 1182 1205 1206 /** FEATURE: Set a property on the root window if the server VT is currently 1207 * switched out. This should be called from the EnterVT/LeaveVT hooks. 1208 * TESTING: the feature works if seamless mode and dynamic resizing are 1209 * disabled on the host when a VT switch to a text console is done on an old 1210 * X11 guest. When the vboxvideo DDX is running the property created should 1211 * exist exactly when the X server is switched out. */ 1212 static Bool setVTRootProperty(ScrnInfoPtr pScrn, BOOL fLeave) 1213 { 1214 Atom propertyName = MakeAtom("XFree86_NO_VT", sizeof("XFree86_NO_VT") - 1, 1215 TRUE); 1216 int32_t cValue = 0; 1217 int rc; 1218 1219 if (propertyName == BAD_RESOURCE) 1220 return FALSE; 1221 rc = fLeave 1222 ? ChangeWindowProperty(ROOT_WINDOW(pScrn), propertyName, XA_INTEGER, 1223 32, PropModeReplace, 1, &cValue, TRUE) 1224 : DELETE_PROPERTY(serverClient, ROOT_WINDOW(pScrn), propertyName); 1225 return rc == Success; 1226 } 1227 1183 1228 static Bool VBOXEnterVT(ScrnInfoPtr pScrn) 1184 1229 { … … 1209 1254 return FALSE; 1210 1255 #endif 1256 setVTRootProperty(pScrn, FALSE); 1211 1257 return TRUE; 1212 1258 } … … 1230 1276 #endif 1231 1277 VBOXRestoreMode(pScrn); 1278 setVTRootProperty(pScrn, TRUE); 1232 1279 TRACE_EXIT(); 1233 1280 }
Note:
See TracChangeset
for help on using the changeset viewer.