diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2013-06-07 17:28:57 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2013-06-07 17:28:57 +0000 |
commit | c0190187060808fe0ad2a09b31f4244757572ff9 (patch) | |
tree | b028697436476ae3ff34218b0b233a233d8a7818 /xserver/Xext/xvmain.c | |
parent | 33eda071f5846d332b428de759c5b1649e9cf1ba (diff) |
Update to X server 1.14.1. Tested by many during t2k13. Thanks.
Diffstat (limited to 'xserver/Xext/xvmain.c')
-rw-r--r-- | xserver/Xext/xvmain.c | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/xserver/Xext/xvmain.c b/xserver/Xext/xvmain.c index 48061a286..c2860b86a 100644 --- a/xserver/Xext/xvmain.c +++ b/xserver/Xext/xvmain.c @@ -88,6 +88,7 @@ SOFTWARE. #include "pixmapstr.h" #include "gc.h" #include "extnsionst.h" +#include "extinit.h" #include "dixstruct.h" #include "resource.h" #include "opaque.h" @@ -129,7 +130,7 @@ static void WriteSwappedVideoNotifyEvent(xvEvent *, xvEvent *); static void WriteSwappedPortNotifyEvent(xvEvent *, xvEvent *); static Bool CreateResourceTypes(void); -static Bool XvCloseScreen(int, ScreenPtr); +static Bool XvCloseScreen(ScreenPtr); static Bool XvDestroyPixmap(PixmapPtr); static Bool XvDestroyWindow(WindowPtr); static void XvResetProc(ExtensionEntry *); @@ -290,7 +291,7 @@ XvScreenInit(ScreenPtr pScreen) } static Bool -XvCloseScreen(int ii, ScreenPtr pScreen) +XvCloseScreen(ScreenPtr pScreen) { XvScreenPtr pxvs; @@ -301,13 +302,13 @@ XvCloseScreen(int ii, ScreenPtr pScreen) pScreen->DestroyWindow = pxvs->DestroyWindow; pScreen->CloseScreen = pxvs->CloseScreen; - (*pxvs->ddCloseScreen) (ii, pScreen); + (*pxvs->ddCloseScreen) (pScreen); free(pxvs); dixSetPrivate(&pScreen->devPrivates, XvScreenKey, NULL); - return (*pScreen->CloseScreen) (ii, pScreen); + return (*pScreen->CloseScreen) (pScreen); } static void @@ -507,19 +508,20 @@ XvdiDestroyEncoding(pointer value, XID id) static int XvdiSendVideoNotify(XvPortPtr pPort, DrawablePtr pDraw, int reason) { - xvEvent event; XvVideoNotifyPtr pn; dixLookupResourceByType((pointer *) &pn, pDraw->id, XvRTVideoNotifyList, serverClient, DixReadAccess); while (pn) { + xvEvent event = { + .u.videoNotify.reason = reason, + .u.videoNotify.time = currentTime.milliseconds, + .u.videoNotify.drawable = pDraw->id, + .u.videoNotify.port = pPort->id + }; event.u.u.type = XvEventBase + XvVideoNotify; - event.u.videoNotify.time = currentTime.milliseconds; - event.u.videoNotify.drawable = pDraw->id; - event.u.videoNotify.port = pPort->id; - event.u.videoNotify.reason = reason; - WriteEventsToClient(pn->client, 1, (xEventPtr) & event); + WriteEventsToClient(pn->client, 1, (xEventPtr) &event); pn = pn->next; } @@ -530,18 +532,19 @@ XvdiSendVideoNotify(XvPortPtr pPort, DrawablePtr pDraw, int reason) int XvdiSendPortNotify(XvPortPtr pPort, Atom attribute, INT32 value) { - xvEvent event; XvPortNotifyPtr pn; pn = pPort->pNotify; while (pn) { + xvEvent event = { + .u.portNotify.time = currentTime.milliseconds, + .u.portNotify.port = pPort->id, + .u.portNotify.attribute = attribute, + .u.portNotify.value = value + }; event.u.u.type = XvEventBase + XvPortNotify; - event.u.portNotify.time = currentTime.milliseconds; - event.u.portNotify.port = pPort->id; - event.u.portNotify.attribute = attribute; - event.u.portNotify.value = value; - WriteEventsToClient(pn->client, 1, (xEventPtr) & event); + WriteEventsToClient(pn->client, 1, (xEventPtr) &event); pn = pn->next; } |