Skip to content

Commit

Permalink
Fix screen flicker when alt-tab is pressed in borderless fullscreen m…
Browse files Browse the repository at this point in the history
  • Loading branch information
gonetz committed Sep 8, 2024
1 parent 7294f02 commit a388812
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Graphics/OpenGLContext/windows/windows_DisplayWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ bool DisplayWindowWindows::_borderlessDevice()
m_screenHeight = static_cast<u32>(deviceMode.dmPelsHeight);
m_heightOffset = 0;
_setBufferSize();
return (SetWindowPos(hWnd, NULL, 0, 0, m_screenWidth, m_screenHeight, SWP_NOACTIVATE | SWP_NOZORDER | SWP_SHOWWINDOW) == TRUE);
return (SetWindowPos(hWnd, NULL, 0, 0, m_screenWidth + 1, m_screenHeight, SWP_NOACTIVATE | SWP_NOZORDER | SWP_SHOWWINDOW) == TRUE);
}
}

Expand All @@ -213,7 +213,7 @@ bool DisplayWindowWindows::_borderlessDevice()
m_screenHeight = std::abs(monitors.rcMonitors[i].top - monitors.rcMonitors[i].bottom);
m_heightOffset = 0;
_setBufferSize();
return (SetWindowPos(hWnd, NULL, X, Y, m_screenWidth, m_screenHeight, SWP_NOACTIVATE | SWP_NOZORDER | SWP_SHOWWINDOW) == TRUE);
return (SetWindowPos(hWnd, NULL, X, Y, m_screenWidth + 1, m_screenHeight, SWP_NOACTIVATE | SWP_NOZORDER | SWP_SHOWWINDOW) == TRUE);
}
}
return false;
Expand Down

0 comments on commit a388812

Please sign in to comment.