Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(253)

Side by Side Diff: ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc

Issue 1811913007: Fix window drawing after snap on Windows 10. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix signedness Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_win.h" 5 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_win.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "third_party/skia/include/core/SkPath.h" 8 #include "third_party/skia/include/core/SkPath.h"
9 #include "third_party/skia/include/core/SkRegion.h" 9 #include "third_party/skia/include/core/SkRegion.h"
10 #include "ui/aura/client/aura_constants.h" 10 #include "ui/aura/client/aura_constants.h"
(...skipping 914 matching lines...) Expand 10 before | Expand all | Expand 10 after
925 const ui::ScrollEvent& event) { 925 const ui::ScrollEvent& event) {
926 SendEventToProcessor(const_cast<ui::ScrollEvent*>(&event)); 926 SendEventToProcessor(const_cast<ui::ScrollEvent*>(&event));
927 return event.handled(); 927 return event.handled();
928 } 928 }
929 929
930 void DesktopWindowTreeHostWin::HandleWindowSizeChanging() { 930 void DesktopWindowTreeHostWin::HandleWindowSizeChanging() {
931 if (compositor()) 931 if (compositor())
932 compositor()->DisableSwapUntilResize(); 932 compositor()->DisableSwapUntilResize();
933 } 933 }
934 934
935 void DesktopWindowTreeHostWin::HandleWindowSizeChanged() { 935 void DesktopWindowTreeHostWin::HandleWindowSizeUnchanged() {
936 // A resize may not have occurred if the window size happened not to have 936 // A resize may not have occurred if the window size happened not to have
937 // changed (can occur on Windows 10 when snapping a window to the side of 937 // changed (can occur on Windows 10 when snapping a window to the side of
938 // the screen). In that case do a resize to the current size to reenable 938 // the screen). In that case do a resize to the current size to reenable
939 // swaps. 939 // swaps.
940 if (compositor()) { 940 if (compositor()) {
941 compositor()->SetScaleAndSize( 941 compositor()->SetScaleAndSize(
942 compositor()->device_scale_factor(), 942 compositor()->device_scale_factor(),
943 message_handler_->GetClientAreaBounds().size()); 943 message_handler_->GetClientAreaBounds().size());
944 } 944 }
945 } 945 }
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
997 997
998 // static 998 // static
999 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( 999 DesktopWindowTreeHost* DesktopWindowTreeHost::Create(
1000 internal::NativeWidgetDelegate* native_widget_delegate, 1000 internal::NativeWidgetDelegate* native_widget_delegate,
1001 DesktopNativeWidgetAura* desktop_native_widget_aura) { 1001 DesktopNativeWidgetAura* desktop_native_widget_aura) {
1002 return new DesktopWindowTreeHostWin(native_widget_delegate, 1002 return new DesktopWindowTreeHostWin(native_widget_delegate,
1003 desktop_native_widget_aura); 1003 desktop_native_widget_aura);
1004 } 1004 }
1005 1005
1006 } // namespace views 1006 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698