Skip to content

Commit

Permalink
chore: appropriate ifdefing
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere committed Mar 16, 2022
1 parent 9cac5df commit ab8a15f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions shell/browser/native_window_views.cc
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion shell/browser/native_window_views_win.cc
Expand Up @@ -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 */);
Expand Down

0 comments on commit ab8a15f

Please sign in to comment.