Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- a/modules/video_output/win32/events.c
- +++ b/modules/video_output/win32/events.c
- @@ -53,6 +53,7 @@
- struct event_thread_t
- {
- vout_display_t *vd;
- + vout_display_cfg_t cfg;
- /* */
- vlc_thread_t thread;
- @@ -313,7 +314,7 @@ static void *EventThread( void *p_this )
- i_key |= KEY_MODIFIER_ALT;
- }
- - vout_display_SendEventKey(vd, i_key);
- + vout_window_ReportKeyPress(p_event->parent_window, i_key);
- }
- break;
- }
- @@ -343,7 +344,7 @@ static void *EventThread( void *p_this )
- {
- i_key |= KEY_MODIFIER_ALT;
- }
- - vout_display_SendEventKey(vd, i_key);
- + vout_window_ReportKeyPress(p_event->parent_window, i_key);
- }
- break;
- }
- @@ -458,6 +459,9 @@ bool EventThreadGetAndResetHasMoved( event_thread_t *p_event )
- event_thread_t *EventThreadCreate( vout_display_t *vd, const vout_display_cfg_t *vdcfg)
- {
- +
- + if (vdcfg->window->type != VOUT_WINDOW_TYPE_HWND)
- + return NULL;
- /* Create the Vout EventThread, this thread is created by us to isolate
- * the Win32 PeekMessage function calls. We want to do this because
- * Windows can stay blocked inside this call for a long time, and when
- @@ -474,6 +478,7 @@ event_thread_t *EventThreadCreate( vout_display_t *vd, const vout_display_cfg_t
- vlc_mutex_init( &p_event->lock );
- vlc_cond_init( &p_event->wait );
- + p_event->parent_window = vdcfg->window;
- p_event->is_cursor_hidden = false;
- p_event->button_pressed = 0;
- p_event->psz_title = NULL;
- @@ -690,11 +695,7 @@ static int Win32VoutCreateWindow( event_thread_t *p_event )
- #endif
- {
- /* If an external window was specified, we'll draw in it. */
- - p_event->parent_window = vout_display_NewWindow(vd, VOUT_WINDOW_TYPE_HWND);
- - if( p_event->parent_window )
- - p_event->hparent = p_event->parent_window->handle.hwnd;
- - else
- - p_event->hparent = NULL;
- + p_event->hparent = p_event->parent_window->handle.hwnd;
- }
- #if defined(MODULE_NAME_IS_direct3d9) || defined(MODULE_NAME_IS_direct3d11)
- else
- @@ -1012,7 +1013,7 @@ static long FAR PASCAL WinVoutEventProc( HWND hwnd, UINT message,
- /* the user wants to close the window */
- case WM_CLOSE:
- - vout_display_SendEventClose(vd);
- + vout_window_ReportClose(p_event->parent_window);
- return 0;
- /* the window has been closed so shut down everything now */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement