aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xext/xvmain.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-07-11 11:55:48 +0200
committermarha <marha@users.sourceforge.net>2012-07-11 11:55:48 +0200
commit6cab6b3ebc8ed1a81ced93d621ea3abf05e282ab (patch)
tree21e1af7ee94600e349ae21353dc11963a06e988d /xorg-server/Xext/xvmain.c
parent75f57cf199b6c042b0f7515e3a1ab80f7ccecfab (diff)
parentd137057fd13e83ec15ab416c7fe774741da06047 (diff)
downloadvcxsrv-6cab6b3ebc8ed1a81ced93d621ea3abf05e282ab.tar.gz
vcxsrv-6cab6b3ebc8ed1a81ced93d621ea3abf05e282ab.tar.bz2
vcxsrv-6cab6b3ebc8ed1a81ced93d621ea3abf05e282ab.zip
Merge remote-tracking branch 'origin/released'
Conflicts: xorg-server/Xext/shm.c xorg-server/Xext/sync.c xorg-server/Xext/xf86bigfont.c xorg-server/Xi/opendev.c xorg-server/dix/dispatch.c xorg-server/include/globals.h xorg-server/mi/miinitext.c
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 0b508611c..e0708b352 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;
}