static void NestedShadowUpdate(ScreenPtr pScreen, shadowBufPtr pBuf) { RegionPtr pRegion = DamageRegion(pBuf->pDamage); NestedClientUpdateScreen(PCLIENTDATA(xf86Screens[pScreen->myNum]), pRegion->extents.x1, pRegion->extents.y1, pRegion->extents.x2, pRegion->extents.y2); }
void NestedClientCheckEvents(NestedClientPrivatePtr pPriv) { XEvent ev; while(XCheckMaskEvent(pPriv->display, ~0, &ev)) { switch (ev.type) { case Expose: NestedClientUpdateScreen(pPriv, ((XExposeEvent*)&ev)->x, ((XExposeEvent*)&ev)->y, ((XExposeEvent*)&ev)->x + ((XExposeEvent*)&ev)->width, ((XExposeEvent*)&ev)->y + ((XExposeEvent*)&ev)->height); break; #ifdef NESTED_INPUT case MotionNotify: if (!pPriv->dev) { xf86DrvMsg(pPriv->scrnIndex, X_INFO, "Input device is not yet initialized, ignoring input.\n"); break; } NestedInputPostMouseMotionEvent(pPriv->dev, ((XMotionEvent*)&ev)->x, ((XMotionEvent*)&ev)->y); break; case ButtonPress: case ButtonRelease: if (!pPriv->dev) { xf86DrvMsg(pPriv->scrnIndex, X_INFO, "Input device is not yet initialized, ignoring input.\n"); break; } NestedInputPostButtonEvent(pPriv->dev, ev.xbutton.button, ev.type == ButtonPress); break; case KeyPress: case KeyRelease: if (!pPriv->dev) { xf86DrvMsg(pPriv->scrnIndex, X_INFO, "Input device is not yet initialized, ignoring input.\n"); break; } NestedInputPostKeyboardEvent(pPriv->dev, ev.xkey.keycode, ev.type == KeyPress); break; #endif } } }