quartz: Do not send events when notifications are disabled.
Signed-off-by: Anton Baskanov <baskanov@gmail.com> Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
7d0fe79f1d
commit
c6a3072051
|
@ -5288,15 +5288,22 @@ static HRESULT WINAPI MediaEventSink_Notify(IMediaEventSink *iface, LONG EventCo
|
|||
TRACE("Process EC_COMPLETE notification\n");
|
||||
if (++This->EcCompleteCount == This->nRenderers)
|
||||
{
|
||||
evt.lEventCode = EC_COMPLETE;
|
||||
evt.lParam1 = S_OK;
|
||||
evt.lParam2 = 0;
|
||||
TRACE("Send EC_COMPLETE to app\n");
|
||||
EventsQueue_PutEvent(&This->evqueue, &evt);
|
||||
if (!This->notif.disabled && This->notif.hWnd)
|
||||
{
|
||||
TRACE("Send Window message\n");
|
||||
PostMessageW(This->notif.hWnd, This->notif.msg, 0, This->notif.instance);
|
||||
if (!This->notif.disabled)
|
||||
{
|
||||
evt.lEventCode = EC_COMPLETE;
|
||||
evt.lParam1 = S_OK;
|
||||
evt.lParam2 = 0;
|
||||
TRACE("Send EC_COMPLETE to app\n");
|
||||
EventsQueue_PutEvent(&This->evqueue, &evt);
|
||||
if (This->notif.hWnd)
|
||||
{
|
||||
TRACE("Send Window message\n");
|
||||
PostMessageW(This->notif.hWnd, This->notif.msg, 0, This->notif.instance);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SetEvent(This->evqueue.msg_event);
|
||||
}
|
||||
This->CompletionStatus = EC_COMPLETE;
|
||||
This->got_ec_complete = 1;
|
||||
|
@ -5307,13 +5314,13 @@ static HRESULT WINAPI MediaEventSink_Notify(IMediaEventSink *iface, LONG EventCo
|
|||
{
|
||||
/* FIXME: Not handled yet */
|
||||
}
|
||||
else
|
||||
else if (!This->notif.disabled)
|
||||
{
|
||||
evt.lEventCode = EventCode;
|
||||
evt.lParam1 = EventParam1;
|
||||
evt.lParam2 = EventParam2;
|
||||
EventsQueue_PutEvent(&This->evqueue, &evt);
|
||||
if (!This->notif.disabled && This->notif.hWnd)
|
||||
if (This->notif.hWnd)
|
||||
PostMessageW(This->notif.hWnd, This->notif.msg, 0, This->notif.instance);
|
||||
}
|
||||
|
||||
|
|
|
@ -5207,12 +5207,12 @@ static void test_set_notify_flags(void)
|
|||
hr = IMediaEventSink_Notify(media_event_sink, EC_STATUS, (LONG_PTR)status, (LONG_PTR)status);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
|
||||
todo_wine ok(WaitForSingleObject(event, 0) == WAIT_TIMEOUT, "Event should not be signaled.\n");
|
||||
ok(WaitForSingleObject(event, 0) == WAIT_TIMEOUT, "Event should not be signaled.\n");
|
||||
|
||||
ok(!PeekMessageA(&msg, window, WM_USER, WM_USER, PM_REMOVE), "Window should not be notified.\n");
|
||||
|
||||
hr = IMediaEventEx_GetEvent(media_event, &code, ¶m1, ¶m2, 50);
|
||||
todo_wine ok(hr == E_ABORT, "Got hr %#x.\n", hr);
|
||||
ok(hr == E_ABORT, "Got hr %#x.\n", hr);
|
||||
|
||||
hr = IMediaEventSink_Notify(media_event_sink, EC_COMPLETE, S_OK,
|
||||
(LONG_PTR)&filter.IBaseFilter_iface);
|
||||
|
@ -5242,7 +5242,7 @@ static void test_set_notify_flags(void)
|
|||
ok(WaitForSingleObject(event, 0) == 0, "Event should be signaled.\n");
|
||||
|
||||
hr = IMediaEventEx_GetEvent(media_event, &code, ¶m1, ¶m2, 50);
|
||||
todo_wine ok(hr == E_ABORT, "Got hr %#x.\n", hr);
|
||||
ok(hr == E_ABORT, "Got hr %#x.\n", hr);
|
||||
|
||||
todo_wine ok(WaitForSingleObject(event, 0) == WAIT_TIMEOUT, "Event should not be signaled.\n");
|
||||
|
||||
|
|
Loading…
Reference in New Issue