VirtualBox

Changeset 83135 in vbox for trunk/src/VBox/Additions


Ignore:
Timestamp:
Feb 21, 2020 2:28:56 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
136249
Message:

bugref:9637. Reverting the changes to seamless related files.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/x11/VBoxClient/seamless-x11.cpp

    r83048 r83135  
    2626#include <VBox/log.h>
    2727
     28#include "seamless-x11.h"
     29#include "VBoxClient.h"
     30
    2831#include <X11/Xatom.h>
    2932#include <X11/Xmu/WinUtil.h>
    30 
    31 #include "seamless-x11.h"
    32 #include "VBoxClient.h"
    3333
    3434#include <limits.h>
     
    9090        return VERR_ACCESS_DENIED;
    9191    }
    92 
    93     mRandRMask = 0;
    94     mRandRAvailable = false;
    95     /*if (XRRQueryExtension(mDisplay, &mRandREventBase, &mRandRErrorBase))
    96     {
    97         int iRandRMajor = 0;
    98         int iRandRMinor = 0;
    99         if (XRRQueryVersion(mDisplay, &iRandRMajor, &iRandRMinor))
    100         {
    101             mRandRAvailable = true;
    102             mRandRMask = RRScreenChangeNotifyMask;
    103             if (iRandRMinor >= 2)
    104                 mRandRMask |=  RRCrtcChangeNotifyMask |
    105                     RROutputChangeNotifyMask |
    106                     RROutputPropertyNotifyMask;
    107         }
    108         }*/
    10992    mHostCallback = pHostCallback;
    11093    mEnabled = false;
     
    162145    LogRelFlowFuncEnter();
    163146    XSelectInput(mDisplay, DefaultRootWindow(mDisplay), PropertyChangeMask);
    164 }
    165 
    166 void SeamlessX11::monitorRandREvents(XEvent *pEvent)
    167 {
    168     if (!pEvent)
    169         return;
    170     int eventTypeOffset = pEvent->type - mRandREventBase;
    171     switch (eventTypeOffset)
    172     {
    173         case RRScreenChangeNotify:
    174             VBClLogError("RRScreenChangeNotify\n");
    175             break;
    176         case RRNotify:
    177             VBClLogError("RRNotify\n");
    178             break;
    179         default:
    180             VBClLogError("Unknown RR event\n");
    181             break;
    182     }
    183147}
    184148
     
    341305
    342306    LogRelFlowFuncEnter();
    343 
     307    /* Start by sending information about the current window setup to the host.  We do this
     308       here because we want to send all such information from a single thread. */
     309    if (mChanged && mEnabled)
     310    {
     311        updateRects();
     312        mHostCallback(mpRects, mcRects);
     313    }
     314    mChanged = false;
    344315    /* We execute this even when seamless is disabled, as it also waits for
    345316     * enable and disable notification. */
    346317    XNextEvent(mDisplay, &event);
    347     monitorRandREvents(&event);
    348     /* Start by sending information about the current window setup to the host.  We do this
    349        here because we want to send all such information from a single thread. */
    350     if (mChanged && mEnabled)
    351     {
    352         updateRects();
    353         mHostCallback(mpRects, mcRects);
    354     }
    355     mChanged = false;
    356318    if (!mEnabled)
    357319        return;
  • trunk/src/VBox/Additions/x11/VBoxClient/seamless-x11.h

    r83045 r83135  
    3131#include <X11/Xlib.h>
    3232#include <X11/Xutil.h>
    33 #include <X11/Xlibint.h>
    3433#include <X11/extensions/shape.h>
    35 #include <X11/extensions/Xrandr.h>
    3634
    3735#define WM_TYPE_PROP "_NET_WM_WINDOW_TYPE"
     
    4038/* This is defined wrong in my X11 header files! */
    4139#define VBoxShapeNotify 64
    42 
    43 /** Following are stolen from randr.h Define XrandR stuff of they are not there (some ancient build box maybe). */
    44 
    45 /* Event selection bits */
    46 #ifndef RRScreenChangeNotifyMask
    47 #define RRScreenChangeNotifyMask  (1L << 0)
    48 #endif
    49 /* V1.2 additions */
    50 #ifndef RRCrtcChangeNotifyMask
    51 #define RRCrtcChangeNotifyMask      (1L << 1)
    52 #endif
    53 #ifndef RROutputChangeNotifyMask
    54 #define RROutputChangeNotifyMask    (1L << 2)
    55 #endif
    56 
    57 #ifndef RROutputPropertyNotifyMask
    58 #define RROutputPropertyNotifyMask  (1L << 3)
    59 #endif
    60 
    61 /* V1.4 additions */
    62 #ifndef RRProviderChangeNotifyMask
    63 #define RRProviderChangeNotifyMask   (1L << 4)
    64 #endif
    65 
    66 #ifndef RRProviderPropertyNotifyMask
    67 #define RRProviderPropertyNotifyMask (1L << 5)
    68 #endif
    69 
    70 #ifndef RRResourceChangeNotifyMask
    71 #define RRResourceChangeNotifyMask   (1L << 6)
    72 #endif
    73 
    74 #ifndef RRScreenChangeNotify
    75 /* Event codes */
    76 #define RRScreenChangeNotify    0
    77 #endif
    78 #ifndef RRNotify
    79 /* V1.2 additions */
    80 #define RRNotify 1
    81 #endif
    8240
    8341/**
     
    232190    /** Have there been changes since the last time we sent a notification? */
    233191    bool mChanged;
    234     /** Event mask we use to select randr related events. */
    235     int  mRandRMask;
    236     int  mRandREventBase;
    237     int  mRandRErrorBase;
    238     bool mRandRAvailable;
    239192
    240193    // Private methods
     
    251204    void monitorClientList(void);
    252205    void unmonitorClientList(void);
    253     void monitorRandREvents(XEvent *pEvent);
    254206    void rebuildWindowTree(void);
    255207    void addClients(const Window hRoot);
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