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

Unified Diff: content/browser/tab_contents/tab_contents_view_win.cc

Issue 9695011: Fix repainting not happening when switching tabs after resizing the browser. I didn't copy this beh… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/tab_contents/tab_contents_view_win.cc
===================================================================
--- content/browser/tab_contents/tab_contents_view_win.cc (revision 126170)
+++ content/browser/tab_contents/tab_contents_view_win.cc (working copy)
@@ -339,6 +339,20 @@
LRESULT TabContentsViewWin::OnWindowPosChanged(
UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled) {
WINDOWPOS* window_pos = reinterpret_cast<WINDOWPOS*>(lparam);
+ if (window_pos->flags & SWP_HIDEWINDOW) {
+ tab_contents_->HideContents();
+ return 0;
+ }
+
+ // The TabContents was shown by a means other than the user selecting a
+ // Tab, e.g. the window was minimized then restored.
+ if (window_pos->flags & SWP_SHOWWINDOW)
+ tab_contents_->ShowContents();
+
+ // Unless we were specifically told not to size, cause the renderer to be
+ // sized to the new bounds, which forces a repaint. Not required for the
+ // simple minimize-restore case described above, for example, since the
+ // size hasn't changed.
if (window_pos->flags & SWP_NOSIZE)
return 0;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698