Changeset 57265 in vbox for trunk/src/VBox/Additions/x11/VBoxClient
- Timestamp:
- Aug 10, 2015 6:36:34 PM (9 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
r57264 r57265 129 129 { 130 130 LogRelFlowFunc(("called\n")); 131 XSelectInput(mDisplay, DefaultRootWindow(mDisplay), SubstructureNotifyMask);131 XSelectInput(mDisplay, DefaultRootWindow(mDisplay), PropertyChangeMask | SubstructureNotifyMask); 132 132 } 133 133 … … 197 197 XSizeHints dummyHints; 198 198 long dummyLong; 199 /* Apparently (?) some old kwin versions had unwanted client windows 200 * without normal hints. */ 199 201 if (fAddWin && (!XGetWMNormalHints(mDisplay, hClient, &dummyHints, 200 202 &dummyLong))) … … 268 270 Display *pDisplay = (Display *)pvParam; 269 271 270 XShapeSelectInput(pDisplay, pInfo->Core.Key, 0);271 272 delete pInfo; 272 273 return VINF_SUCCESS; … … 320 321 (unsigned long) event.xmap.window, 321 322 event.xmap.send_event)); 322 doMapEvent(event.xmap.window); 323 rebuildWindowTree(); 324 break; 325 case PropertyNotify: 326 if ( event.xproperty.atom != XInternAtom(mDisplay, "_NET_CLIENT_LIST", True /* only_if_exists */) 327 || event.xproperty.window != DefaultRootWindow(mDisplay)) 328 break; 329 LogRelFlowFunc(("_NET_CLIENT_LIST property event on root window.\n")); 330 rebuildWindowTree(); 323 331 break; 324 332 case VBoxShapeNotify: /* This is defined wrong in my X11 header files! */ … … 333 341 (unsigned long) event.xunmap.window, 334 342 event.xunmap.send_event)); 335 doUnmapEvent(event.xunmap.window);343 rebuildWindowTree(); 336 344 break; 337 345 default: … … 359 367 pInfo->mWidth = winAttrib.width; 360 368 pInfo->mHeight = winAttrib.height; 361 if (pInfo->mhasShape)362 {363 XRectangle *pRects;364 int cRects = 0, iOrdering;365 366 pRects = XShapeGetRectangles(mDisplay, hWin, ShapeBounding,367 &cRects, &iOrdering);368 if (!pRects)369 cRects = 0;370 if (pInfo->mpRects)371 XFree(pInfo->mpRects);372 pInfo->mcRects = cRects;373 pInfo->mpRects = pRects;374 }375 369 mChanged = true; 376 370 } 377 371 } 378 379 /**380 * Handle a map event in the seamless event thread.381 *382 * @param event the X11 event structure383 */384 void SeamlessX11::doMapEvent(Window hWin)385 {386 LogRelFlowFunc(("\n"));387 VBoxGuestWinInfo *pInfo = mGuestWindows.find(hWin);388 if (!pInfo)389 {390 addClientWindow(hWin);391 mChanged = true;392 }393 LogRelFlowFunc(("returning\n"));394 }395 396 372 397 373 /** … … 418 394 pInfo->mcRects = cRects; 419 395 pInfo->mpRects = pRects; 420 mChanged = true;421 }422 LogRelFlowFunc(("returning\n"));423 }424 425 /**426 * Handle an unmap event in the seamless event thread.427 *428 * @param event the X11 event structure429 */430 void SeamlessX11::doUnmapEvent(Window hWin)431 {432 LogRelFlowFunc(("\n"));433 VBoxGuestWinInfo *pInfo = mGuestWindows.removeWindow(hWin);434 if (pInfo)435 {436 VBoxGuestWinFree(pInfo, mDisplay);437 396 mChanged = true; 438 397 } -
trunk/src/VBox/Additions/x11/VBoxClient/seamless-x11.h
r57208 r57265 244 244 * can call them. */ 245 245 void doConfigureEvent(Window hWin); 246 void doMapEvent(Window hWin);247 void doUnmapEvent(Window hWin);248 246 void doShapeEvent(Window hWin); 249 247
Note:
See TracChangeset
for help on using the changeset viewer.