diff options
author | Ville Syrjälä <ville.syrjala@nokia.com> | 2010-06-15 23:25:34 +0300 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2010-06-21 19:03:20 -0700 |
commit | f7dae972aac28c5792566e997c40254e787d246a (patch) | |
tree | 1885e613f2c125b0d0ccad68e95a782a6207aff1 /Xext/xvmain.c | |
parent | c20166739603f86888f28ca2c65f5cf474d0d8c9 (diff) |
xv: Don't send port notify when SetPortAttribute fails
Currently a port notify event is sent even if SetPortAttribute
fails. Furthermore the value field in the event will contain the
value that was specified in the failed request. So any client
interested in the actual value of the attribute will have to
double check the current value with GetPortAttribute after
receiving a port notify event.
Fix the problem by sending port notifications only when
SetPortAttribute succeeds.
Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'Xext/xvmain.c')
-rw-r--r-- | Xext/xvmain.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Xext/xvmain.c b/Xext/xvmain.c index 1b80b12e9..12b4c5184 100644 --- a/Xext/xvmain.c +++ b/Xext/xvmain.c @@ -1133,12 +1133,13 @@ XvdiSetPortAttribute( Atom attribute, INT32 value ){ + int status; + status = (* pPort->pAdaptor->ddSetPortAttribute)(client, pPort, attribute, value); + if (status == Success) XvdiSendPortNotify(pPort, attribute, value); - return - (* pPort->pAdaptor->ddSetPortAttribute)(client, pPort, attribute, value); - + return status; } int |