Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com --- dlls/winemac.drv/display.c | 8 ++++++-- dlls/winemac.drv/macdrv.h | 2 +- dlls/winemac.drv/macdrv_main.c | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/dlls/winemac.drv/display.c b/dlls/winemac.drv/display.c index fdb2415885..5a1419511d 100644 --- a/dlls/winemac.drv/display.c +++ b/dlls/winemac.drv/display.c @@ -945,6 +945,8 @@ better: SendMessageW(GetDesktopWindow(), WM_MACDRV_UPDATE_DESKTOP_RECT, mode_bpp, MAKELPARAM(width, height)); ret = DISP_CHANGE_SUCCESSFUL; + + macdrv_init_display_devices(TRUE); } else { @@ -1451,6 +1453,8 @@ void macdrv_displays_changed(const macdrv_event *event) free_display_mode_descriptor(desc); CGDisplayModeRelease(mode);
+ macdrv_init_display_devices(TRUE); + if (is_original && retina_enabled) { width *= 2; @@ -1722,7 +1726,7 @@ static void cleanup_devices(void) * * Initialize display device registry data. */ -void macdrv_init_display_devices(void) +void macdrv_init_display_devices(BOOL force) { static const WCHAR init_mutexW[] = {'d','i','s','p','l','a','y','_','d','e','v','i','c','e','_','i','n','i','t',0}; HANDLE mutex; @@ -1749,7 +1753,7 @@ void macdrv_init_display_devices(void) }
/* Avoid unnecessary reinit */ - if (disposition != REG_CREATED_NEW_KEY) + if (!force && disposition != REG_CREATED_NEW_KEY) goto done;
TRACE("\n"); diff --git a/dlls/winemac.drv/macdrv.h b/dlls/winemac.drv/macdrv.h index 064b93a1df..a5bcfec519 100644 --- a/dlls/winemac.drv/macdrv.h +++ b/dlls/winemac.drv/macdrv.h @@ -223,7 +223,7 @@ extern CGImageRef create_cgimage_from_icon_bitmaps(HDC hdc, HANDLE icon, HBITMAP extern void macdrv_status_item_mouse_move(const macdrv_event *event) DECLSPEC_HIDDEN;
extern void check_retina_status(void) DECLSPEC_HIDDEN; -extern void macdrv_init_display_devices(void) DECLSPEC_HIDDEN; +extern void macdrv_init_display_devices(BOOL force) DECLSPEC_HIDDEN;
/************************************************************************** * Mac IME driver diff --git a/dlls/winemac.drv/macdrv_main.c b/dlls/winemac.drv/macdrv_main.c index 038578491f..694a46b11e 100644 --- a/dlls/winemac.drv/macdrv_main.c +++ b/dlls/winemac.drv/macdrv_main.c @@ -299,7 +299,7 @@ static BOOL process_attach(void) return FALSE; }
- macdrv_init_display_devices(); + macdrv_init_display_devices(FALSE);
return TRUE; }
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=54471
Your paranoid android.
=== debian9 (32 bit report) ===
user32: msg.c:8713: Test failed: WaitForSingleObject failed 102 msg.c:8719: Test failed: destroy child on thread exit: 0: the msg 0x0082 was expected, but got msg 0x000f instead msg.c:8719: Test failed: destroy child on thread exit: 1: the msg 0x000f was expected, but got msg 0x0014 instead msg.c:8719: Test failed: destroy child on thread exit: 2: the msg sequence is not complete: expected 0014 - actual 0000
=== debian9 (64 bit WoW report) ===
user32: msg.c:8713: Test failed: WaitForSingleObject failed 102 msg.c:8719: Test failed: destroy child on thread exit: 0: the msg 0x0082 was expected, but got msg 0x000f instead msg.c:8719: Test failed: destroy child on thread exit: 1: the msg 0x000f was expected, but got msg 0x0014 instead msg.c:8719: Test failed: destroy child on thread exit: 2: the msg sequence is not complete: expected 0014 - actual 0000