VirtualBox

Changeset 50979 in vbox for trunk/src/VBox/Additions/x11


Ignore:
Timestamp:
Apr 4, 2014 8:08:05 PM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
93154
Message:

Additions/x11/vboxvideo: revert r92593: set a root window property when we do not own the active VT.

Location:
trunk/src/VBox/Additions/x11/vboxvideo
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/x11/vboxvideo/undefined

    r50662 r50979  
    1 ChangeWindowProperty
    2 DeleteProperty
    31DRI2CloseScreen
    42DRI2ScreenInit
     
    2119ShadowFBInit2
    2220VErrorF
    23 WindowTable
    2421XNFcalloc
    2522XNFstrdup
     
    10097resVgaShared
    10198screenInfo
    102 serverClient
    10399serverGeneration
    104100setenv
  • trunk/src/VBox/Additions/x11/vboxvideo/vboxvideo.c

    r50668 r50979  
    101101# include "xf86Crtc.h"
    102102# 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
    108105
    109106#ifdef VBOX_DRI
     
    669666# define SCRNINDEXAPI(pfn) pfn
    670667#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
    691668
    692669static void setScreenFunctions(ScrnInfoPtr pScrn, xf86ProbeProc pfnProbe)
     
    12041181}
    12051182
    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 
    12281183static Bool VBOXEnterVT(ScrnInfoPtr pScrn)
    12291184{
     
    12541209        return FALSE;
    12551210#endif
    1256     setVTRootProperty(pScrn, FALSE);
    12571211    return TRUE;
    12581212}
     
    12761230#endif
    12771231        VBOXRestoreMode(pScrn);
    1278     setVTRootProperty(pScrn, TRUE);
    12791232    TRACE_EXIT();
    12801233}
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette