aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xext/xvmain.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-07-10 14:56:29 +0200
committermarha <marha@users.sourceforge.net>2012-07-10 14:56:29 +0200
commitd137057fd13e83ec15ab416c7fe774741da06047 (patch)
treef4b38caa4f3ecb983f00e84f4f4d8d66699ecbc5 /xorg-server/Xext/xvmain.c
parentc29d91cfd8df084f16d0d2dfa82c3a86f7719a73 (diff)
downloadvcxsrv-d137057fd13e83ec15ab416c7fe774741da06047.tar.gz
vcxsrv-d137057fd13e83ec15ab416c7fe774741da06047.tar.bz2
vcxsrv-d137057fd13e83ec15ab416c7fe774741da06047.zip
fontconfig mesa xserver git update 10 Jul 2012
Diffstat (limited to 'xorg-server/Xext/xvmain.c')
-rw-r--r--xorg-server/Xext/xvmain.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/xorg-server/Xext/xvmain.c b/xorg-server/Xext/xvmain.c
index 736114b6e..c2860b86a 100644
--- a/xorg-server/Xext/xvmain.c
+++ b/xorg-server/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"
@@ -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;
}