From ab8a15f4013c4b7e132d4dd83d32ac0e66bec30f Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Wed, 16 Mar 2022 23:50:21 +0100 Subject: [PATCH] chore: appropriate ifdefing --- shell/browser/native_window_views.cc | 2 ++ shell/browser/native_window_views_win.cc | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/shell/browser/native_window_views.cc b/shell/browser/native_window_views.cc index 9ac1a31fee736..12b9d8cc94295 100644 --- a/shell/browser/native_window_views.cc +++ b/shell/browser/native_window_views.cc @@ -699,10 +699,12 @@ bool NativeWindowViews::IsFullscreen() const { } void NativeWindowViews::SetBounds(const gfx::Rect& bounds, bool animate) { +#if BUILDFLAG(IS_WIN) if (is_moving_ || is_resizing_) { pending_bounds_changes_.push(bounds); return; } +#endif #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) // On Linux and Windows the minimum and maximum size should be updated with diff --git a/shell/browser/native_window_views_win.cc b/shell/browser/native_window_views_win.cc index a32bd6b71ec3c..bfac0a9e2987c 100644 --- a/shell/browser/native_window_views_win.cc +++ b/shell/browser/native_window_views_win.cc @@ -314,7 +314,8 @@ bool NativeWindowViews::PreHandleMSG(UINT message, NotifyWindowMoved(); is_moving_ = false; } - if (!pending_bounds_changes_.empty()) { + + while (!pending_bounds_changes_.empty()) { auto next_bounds_change = pending_bounds_changes_.front(); pending_bounds_changes_.pop(); SetBounds(next_bounds_change, false /* animate */);