vkd3d: Fix top-most handling when restoring from fullscreen
Signed-off-by: Joshua Ashton <joshua@froggi.es>
This commit is contained in:
parent
8a82b718e4
commit
87c35016b8
|
@ -455,7 +455,7 @@ static LONG fullscreen_exstyle(LONG exstyle)
|
|||
void d3d12_swapchain_state_restore_from_fullscreen(struct d3d12_swapchain *swapchain,
|
||||
HWND window, const RECT *window_rect)
|
||||
{
|
||||
unsigned int window_pos_flags = SWP_FRAMECHANGED | SWP_NOZORDER | SWP_NOACTIVATE;
|
||||
unsigned int window_pos_flags = SWP_FRAMECHANGED | SWP_NOACTIVATE;
|
||||
LONG style, exstyle;
|
||||
RECT rect = {0};
|
||||
|
||||
|
@ -482,8 +482,10 @@ void d3d12_swapchain_state_restore_from_fullscreen(struct d3d12_swapchain *swapc
|
|||
rect = *window_rect;
|
||||
else
|
||||
window_pos_flags |= (SWP_NOMOVE | SWP_NOSIZE);
|
||||
SetWindowPos(window, 0, rect.left, rect.top,
|
||||
rect.right - rect.left, rect.bottom - rect.top, window_pos_flags);
|
||||
|
||||
SetWindowPos(window, (swapchain->state.exstyle & WS_EX_TOPMOST) ? HWND_TOPMOST : HWND_NOTOPMOST,
|
||||
rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top,
|
||||
window_pos_flags);
|
||||
|
||||
/* Delete the old values. */
|
||||
swapchain->state.style = 0;
|
||||
|
|
Loading…
Reference in New Issue