<html><head></head><body>I don't think the display has any business overriding the window title. Doing so breaks the window title feature - and violates the thread access rules for the window.<br><br>IMO, this should be removed entirely.<br><br><div class="gmail_quote">Le 13 mai 2019 14:54:48 GMT+03:00, Steve Lhomme <robux4@ycbcr.xyz> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">We should avoid accessing directly the window from the display module.<br><br>And it should have been using vd->cfg->window.<hr> include/vlc_vout_display.h | 4 ++++<br> modules/video_output/win32/direct3d11.c | 2 +-<br> modules/video_output/win32/direct3d9.c | 2 +-<br> modules/video_output/win32/glwin32.c | 2 +-<br> modules/video_output/win32/wingdi.c | 2 +-<br> 5 files changed, 8 insertions(+), 4 deletions(-)<br><br>diff --git a/include/vlc_vout_display.h b/include/vlc_vout_display.h<br>index 97a6c96c1b..687a655cfc 100644<br>--- a/include/vlc_vout_display.h<br>+++ b/include/vlc_vout_display.h<br>@@ -384,6 +384,10 @@ static inline void vout_display_SendEventMouseDoubleClick(vout_display_t *vd)<br> {<br> vout_window_ReportMouseDoubleClick(vd->cfg->window, MOUSE_BUTTON_LEFT);<br> }<br>+static inline void vout_display_SendEventTitle(vout_display_t *vd, const char *title)<br>+{<br>+ vout_window_SetTitle(vd->cfg->window, title);<br>+}<br> static inline void vout_display_SendEventViewpointMoved(vout_display_t *vd,<br> const vlc_viewpoint_t *vp)<br> {<br>diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c<br>index d0bd833ab7..b2d5b000f1 100644<br>--- a/modules/video_output/win32/direct3d11.c<br>+++ b/modules/video_output/win32/direct3d11.c<br>@@ -717,7 +717,7 @@ static int Open(vout_display_t *vd, const vout_display_cfg_t *cfg,<br> goto error;<br> }<br> <br>- vout_window_SetTitle(sys->area.vdcfg.window, VOUT_TITLE " (Direct3D11 output)");<br>+ vout_display_SendEventTitle(vd, VOUT_TITLE " (Direct3D11 output)");<br> msg_Dbg(vd, "Direct3D11 device adapter successfully initialized");<br> <br> vd->info.can_scale_spu = true;<br>diff --git a/modules/video_output/win32/direct3d9.c b/modules/video_output/win32/direct3d9.c<br>index 3f1381c3fe..8d5f6b059d 100644<br>--- a/modules/video_output/win32/direct3d9.c<br>+++ b/modules/video_output/win32/direct3d9.c<br>@@ -1548,7 +1548,7 @@ static int Direct3D9Open(vout_display_t *vd, video_format_t *fmt,<br> }<br> <br> /* Change the window title bar text */<br>- vout_window_SetTitle(sys->area.vdcfg.window, VOUT_TITLE " (Direct3D9 output)");<br>+ vout_display_SendEventTitle(vd, VOUT_TITLE " (Direct3D9 output)");<br> <br> msg_Dbg(vd, "Direct3D9 device adapter successfully initialized");<br> return VLC_SUCCESS;<br>diff --git a/modules/video_output/win32/glwin32.c b/modules/video_output/win32/glwin32.c<br>index 247baea475..bad1f5ee57 100644<br>--- a/modules/video_output/win32/glwin32.c<br>+++ b/modules/video_output/win32/glwin32.c<br>@@ -130,7 +130,7 @@ static int Open(vout_display_t *vd, const vout_display_cfg_t *cfg,<br> if (vd->source.projection_mode != PROJECTION_MODE_RECTANGULAR)<br> sys->p_sensors = HookWindowsSensors(vd, sys->sys.hvideownd);<br> <br>- vout_window_SetTitle(sys->area.vdcfg.window, VOUT_TITLE " (OpenGL output)");<br>+ vout_display_SendEventTitle(vd, VOUT_TITLE " (OpenGL output)");<br> <br> vout_display_cfg_t embed_cfg = *cfg;<br> embed_cfg.window = EmbedVideoWindow_Create(vd);<br>diff --git a/modules/video_output/win32/wingdi.c b/modules/video_output/win32/wingdi.c<br>index 2e7054b318..82bb99ea88 100644<br>--- a/modules/video_output/win32/wingdi.c<br>+++ b/modules/video_output/win32/wingdi.c<br>@@ -272,7 +272,7 @@ static int Init(vout_display_t *vd, video_format_t *fmt)<br> SelectObject(sys->off_dc, sys->off_bitmap);<br> ReleaseDC(sys->sys.hvideownd, window_dc);<br> <br>- vout_window_SetTitle(sys->area.vdcfg.window, VOUT_TITLE " (WinGDI output)");<br>+ vout_display_SendEventTitle(vd, VOUT_TITLE " (WinGDI output)");<br> <br> return VLC_SUCCESS;<br> }</pre></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>