VirtualBox

Ignore:
Timestamp:
Aug 10, 2015 6:36:34 PM (9 years ago)
Author:
vboxsync
Message:

Additions/x11/VBoxClient: fix problems with invisible seamless windows in OpenBox and improve seamless responsiveness.

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  
    129129{
    130130    LogRelFlowFunc(("called\n"));
    131     XSelectInput(mDisplay, DefaultRootWindow(mDisplay), SubstructureNotifyMask);
     131    XSelectInput(mDisplay, DefaultRootWindow(mDisplay), PropertyChangeMask | SubstructureNotifyMask);
    132132}
    133133
     
    197197    XSizeHints dummyHints;
    198198    long dummyLong;
     199    /* Apparently (?) some old kwin versions had unwanted client windows
     200     * without normal hints. */
    199201    if (fAddWin && (!XGetWMNormalHints(mDisplay, hClient, &dummyHints,
    200202                                       &dummyLong)))
     
    268270    Display *pDisplay = (Display *)pvParam;
    269271
    270     XShapeSelectInput(pDisplay, pInfo->Core.Key, 0);
    271272    delete pInfo;
    272273    return VINF_SUCCESS;
     
    320321                       (unsigned long) event.xmap.window,
    321322                       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();
    323331        break;
    324332    case VBoxShapeNotify:  /* This is defined wrong in my X11 header files! */
     
    333341                       (unsigned long) event.xunmap.window,
    334342                       event.xunmap.send_event));
    335         doUnmapEvent(event.xunmap.window);
     343        rebuildWindowTree();
    336344        break;
    337345    default:
     
    359367        pInfo->mWidth = winAttrib.width;
    360368        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         }
    375369        mChanged = true;
    376370    }
    377371}
    378 
    379 /**
    380  * Handle a map event in the seamless event thread.
    381  *
    382  * @param event the X11 event structure
    383  */
    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 
    396372
    397373/**
     
    418394        pInfo->mcRects = cRects;
    419395        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 structure
    429  */
    430 void SeamlessX11::doUnmapEvent(Window hWin)
    431 {
    432     LogRelFlowFunc(("\n"));
    433     VBoxGuestWinInfo *pInfo = mGuestWindows.removeWindow(hWin);
    434     if (pInfo)
    435     {
    436         VBoxGuestWinFree(pInfo, mDisplay);
    437396        mChanged = true;
    438397    }
  • trunk/src/VBox/Additions/x11/VBoxClient/seamless-x11.h

    r57208 r57265  
    244244     * can call them. */
    245245    void doConfigureEvent(Window hWin);
    246     void doMapEvent(Window hWin);
    247     void doUnmapEvent(Window hWin);
    248246    void doShapeEvent(Window hWin);
    249247
Note: See TracChangeset for help on using the changeset viewer.

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