Changeset 85121 in vbox for trunk/src/VBox/Additions/x11/VBoxClient
- Timestamp:
- Jul 8, 2020 7:33:26 PM (5 years ago)
- Location:
- trunk/src/VBox/Additions/x11/VBoxClient
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/x11/VBoxClient/seamless-x11.cpp
r83135 r85121 430 430 RTVEC_DECL(RectList, RTRECT) 431 431 432 DECLCALLBACK(int) getRectsCallback(VBoxGuestWinInfo *pInfo, 433 struct RectList *pRects) 432 static DECLCALLBACK(int) getRectsCallback(VBoxGuestWinInfo *pInfo, struct RectList *pRects) 434 433 { 435 434 if (pInfo->mhasShape) … … 485 484 return rc; 486 485 } 487 mGuestWindows.doWithAll((PVBOXGUESTWINCALLBACK)getRectsCallback, 488 &rects); 486 mGuestWindows.doWithAll((PFNVBOXGUESTWINCALLBACK)getRectsCallback, &rects); 489 487 if (mpRects) 490 488 RTMemFree(mpRects); -
trunk/src/VBox/Additions/x11/VBoxClient/seamless-x11.h
r83135 r85121 49 49 /** Structure containing information about a guest window's position and visible area. 50 50 Used inside of VBoxGuestWindowList. */ 51 struct VBoxGuestWinInfo { 51 struct VBoxGuestWinInfo 52 { 52 53 public: 53 54 /** Header structure for insertion into an AVL tree */ … … 66 67 XRectangle *mpRects; 67 68 /** Constructor. */ 68 VBoxGuestWinInfo(bool hasShape, int x, int y, int w, int h, int cRects, 69 XRectangle *pRects)70 : mhasShape(hasShape), mX(x), mY(y), mWidth(w), mHeight(h),71 mcRects(cRects), mpRects(pRects){}69 VBoxGuestWinInfo(bool hasShape, int x, int y, int w, int h, int cRects, XRectangle *pRects) 70 : mhasShape(hasShape), mX(x), mY(y), mWidth(w), mHeight(h) 71 , mcRects(cRects), mpRects(pRects) 72 {} 72 73 73 74 /** Destructor */ … … 83 84 private: 84 85 // We don't want a copy constructor or assignment operator 85 VBoxGuestWinInfo(const VBoxGuestWinInfo &);86 VBoxGuestWinInfo & operator=(const VBoxGuestWinInfo&);86 VBoxGuestWinInfo(const VBoxGuestWinInfo &); 87 VBoxGuestWinInfo &operator=(const VBoxGuestWinInfo &); 87 88 }; 88 89 89 90 /** Callback type used for "DoWithAll" calls */ 90 typedef DECLCALLBACK (int) VBOXGUESTWINCALLBACK(VBoxGuestWinInfo *, void *);91 typedef DECLCALLBACKTYPE(int, FNVBOXGUESTWINCALLBACK,(VBoxGuestWinInfo *, void *)); 91 92 /** Pointer to VBOXGUESTWINCALLBACK */ 92 typedef VBOXGUESTWINCALLBACK *PVBOXGUESTWINCALLBACK;93 94 DECLCALLBACK(int) inlineVBoxGuestWinCleanup(VBoxGuestWinInfo *pInfo, void *)93 typedef FNVBOXGUESTWINCALLBACK *PFNVBOXGUESTWINCALLBACK; 94 95 static inline DECLCALLBACK(int) VBoxGuestWinCleanup(VBoxGuestWinInfo *pInfo, void *) 95 96 { 96 97 delete pInfo; … … 136 137 } 137 138 138 void detachAll(PVBOXGUESTWINCALLBACK pCallback, void *pvParam) 139 { 140 RTAvlU32Destroy(&mWindows, (PAVLU32CALLBACK)pCallback, pvParam); 141 } 142 143 int doWithAll(PVBOXGUESTWINCALLBACK pCallback, void *pvParam) 144 { 145 return RTAvlU32DoWithAll(&mWindows, 1, (PAVLU32CALLBACK)pCallback, 146 pvParam); 139 void detachAll(PFNVBOXGUESTWINCALLBACK pfnCallback, void *pvParam) 140 { 141 RTAvlU32Destroy(&mWindows, (PAVLU32CALLBACK)pfnCallback, pvParam); 142 } 143 144 int doWithAll(PFNVBOXGUESTWINCALLBACK pfnCallback, void *pvParam) 145 { 146 return RTAvlU32DoWithAll(&mWindows, 1, (PAVLU32CALLBACK)pfnCallback, pvParam); 147 147 } 148 148 … … 152 152 LogRelFlowFunc(("hWin=%lu, isMapped=%RTbool, x=%d, y=%d, w=%d, h=%d, cRects=%d\n", 153 153 (unsigned long) hWin, isMapped, x, y, w, h, cRects)); 154 VBoxGuestWinInfo *pInfo = new VBoxGuestWinInfo(isMapped, x, y, w, h, cRects, 155 pRects); 154 VBoxGuestWinInfo *pInfo = new VBoxGuestWinInfo(isMapped, x, y, w, h, cRects, pRects); 156 155 pInfo->Core.Key = hWin; 157 156 LogRelFlowFuncLeave();
Note:
See TracChangeset
for help on using the changeset viewer.