refactor(new_editor): centralize win32 frame execution
This commit is contained in:
@@ -400,6 +400,8 @@ bool EditorWindowChromeController::HandleResizePointerMove(
|
||||
EditorWindow& window,
|
||||
EditorContext& editorContext,
|
||||
bool globalTabDragActive) {
|
||||
(void)editorContext;
|
||||
(void)globalTabDragActive;
|
||||
if (!IsBorderlessResizeActive() ||
|
||||
window.m_state->window.hwnd == nullptr) {
|
||||
return false;
|
||||
@@ -428,7 +430,7 @@ bool EditorWindowChromeController::HandleResizePointerMove(
|
||||
static_cast<UINT>(width),
|
||||
static_cast<UINT>(height));
|
||||
window.ApplyWindowResize(static_cast<UINT>(width), static_cast<UINT>(height));
|
||||
(void)window.RenderFrame(editorContext, globalTabDragActive);
|
||||
window.RequestFrame(EditorWindowFrameRequestReason::BorderlessTransition);
|
||||
|
||||
SetWindowPos(
|
||||
window.m_state->window.hwnd,
|
||||
@@ -897,6 +899,8 @@ bool EditorWindowChromeController::ApplyPredictedWindowRectTransition(
|
||||
EditorContext& editorContext,
|
||||
bool globalTabDragActive,
|
||||
const RECT& targetRect) {
|
||||
(void)editorContext;
|
||||
(void)globalTabDragActive;
|
||||
if (window.m_state->window.hwnd == nullptr) {
|
||||
return false;
|
||||
}
|
||||
@@ -909,7 +913,6 @@ bool EditorWindowChromeController::ApplyPredictedWindowRectTransition(
|
||||
|
||||
SetPredictedClientPixelSize(static_cast<UINT>(width), static_cast<UINT>(height));
|
||||
window.ApplyWindowResize(static_cast<UINT>(width), static_cast<UINT>(height));
|
||||
(void)window.RenderFrame(editorContext, globalTabDragActive);
|
||||
SetWindowPos(
|
||||
window.m_state->window.hwnd,
|
||||
nullptr,
|
||||
@@ -918,6 +921,7 @@ bool EditorWindowChromeController::ApplyPredictedWindowRectTransition(
|
||||
width,
|
||||
height,
|
||||
SWP_NOZORDER | SWP_NOACTIVATE);
|
||||
window.RequestFrame(EditorWindowFrameRequestReason::BorderlessTransition);
|
||||
window.InvalidateHostWindow();
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user