Changeset 50979 in vbox for trunk/src/VBox/Additions/x11
- Timestamp:
- Apr 4, 2014 8:08:05 PM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 93154
- Location:
- trunk/src/VBox/Additions/x11/vboxvideo
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/x11/vboxvideo/undefined
r50662 r50979 1 ChangeWindowProperty2 DeleteProperty3 1 DRI2CloseScreen 4 2 DRI2ScreenInit … … 21 19 ShadowFBInit2 22 20 VErrorF 23 WindowTable24 21 XNFcalloc 25 22 XNFstrdup … … 100 97 resVgaShared 101 98 screenInfo 102 serverClient103 99 serverGeneration 104 100 setenv -
trunk/src/VBox/Additions/x11/vboxvideo/vboxvideo.c
r50668 r50979 101 101 # include "xf86Crtc.h" 102 102 # include "xf86Modes.h" 103 #endif 104 105 /* For setting the root window property. */ 106 #include <X11/Xatom.h> 107 #include "property.h" 103 # include <X11/Xatom.h> 104 #endif 108 105 109 106 #ifdef VBOX_DRI … … 669 666 # define SCRNINDEXAPI(pfn) pfn 670 667 #endif /* XF86_SCRN_INTERFACE */ 671 672 /** Helper to work round different ways of getting the root window in different673 * server versions. */674 #if defined(XORG_VERSION_CURRENT) && XORG_VERSION_CURRENT < 700000000 \675 && XORG_VERSION_CURRENT >= 100900000676 # define ROOT_WINDOW(pScrn) xf86ScrnToScreen(pScrn)->root677 #else678 # define ROOT_WINDOW(pScrn) WindowTable[xf86ScrnToScreen(pScrn)->myNum]679 #endif680 681 /** Helper to work round different prototypes for DeleteProperty in different682 * server versions. */683 #if defined(XORG_VERSION_CURRENT) && XORG_VERSION_CURRENT < 700000000 \684 && XORG_VERSION_CURRENT >= 100500000685 # define DELETE_PROPERTY(client, window, prop) \686 DeleteProperty(client, window, prop)687 #else688 # define DELETE_PROPERTY(client, window, prop) \689 DeleteProperty(window, prop)690 #endif691 668 692 669 static void setScreenFunctions(ScrnInfoPtr pScrn, xf86ProbeProc pfnProbe) … … 1204 1181 } 1205 1182 1206 /** FEATURE: Set a property on the root window if the server VT is currently1207 * switched out. This should be called from the EnterVT/LeaveVT hooks.1208 * TESTING: the feature works if seamless mode and dynamic resizing are1209 * disabled on the host when a VT switch to a text console is done on an old1210 * X11 guest. When the vboxvideo DDX is running the property created should1211 * 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 = fLeave1222 ? 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 1228 1183 static Bool VBOXEnterVT(ScrnInfoPtr pScrn) 1229 1184 { … … 1254 1209 return FALSE; 1255 1210 #endif 1256 setVTRootProperty(pScrn, FALSE);1257 1211 return TRUE; 1258 1212 } … … 1276 1230 #endif 1277 1231 VBOXRestoreMode(pScrn); 1278 setVTRootProperty(pScrn, TRUE);1279 1232 TRACE_EXIT(); 1280 1233 }
Note:
See TracChangeset
for help on using the changeset viewer.