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

Side by Side Diff: ui/views/win/hwnd_message_handler.cc

Issue 1935883002: win: Fix black pixel artifact at right and bottom Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 6 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
« no previous file with comments | « ui/views/win/hwnd_message_handler.h ('k') | ui/views/win/hwnd_message_handler_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/win/hwnd_message_handler.h" 5 #include "ui/views/win/hwnd_message_handler.h"
6 6
7 #include <dwmapi.h> 7 #include <dwmapi.h>
8 #include <oleacc.h> 8 #include <oleacc.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #include <tchar.h> 10 #include <tchar.h>
(...skipping 2103 matching lines...) Expand 10 before | Expand all | Expand 10 after
2114 // want Windows to draw the scrollbars. To achieve this we hide the scroll 2114 // want Windows to draw the scrollbars. To achieve this we hide the scroll
2115 // bars and readd them to the window style in a posted task to ensure that we 2115 // bars and readd them to the window style in a posted task to ensure that we
2116 // don't get nested WM_SIZE messages. 2116 // don't get nested WM_SIZE messages.
2117 if (needs_scroll_styles_ && !in_size_loop_) { 2117 if (needs_scroll_styles_ && !in_size_loop_) {
2118 ShowScrollBar(hwnd(), SB_BOTH, FALSE); 2118 ShowScrollBar(hwnd(), SB_BOTH, FALSE);
2119 base::ThreadTaskRunnerHandle::Get()->PostTask( 2119 base::ThreadTaskRunnerHandle::Get()->PostTask(
2120 FROM_HERE, base::Bind(&AddScrollStylesToWindow, hwnd())); 2120 FROM_HERE, base::Bind(&AddScrollStylesToWindow, hwnd()));
2121 } 2121 }
2122 } 2122 }
2123 2123
2124 void HWNDMessageHandler::OnSizing(UINT edge, RECT* rect) {
2125 delegate_->HandleSizing(edge, rect);
2126 }
2127
2124 void HWNDMessageHandler::OnSysCommand(UINT notification_code, 2128 void HWNDMessageHandler::OnSysCommand(UINT notification_code,
2125 const gfx::Point& point) { 2129 const gfx::Point& point) {
2126 if (!delegate_->ShouldHandleSystemCommands()) 2130 if (!delegate_->ShouldHandleSystemCommands())
2127 return; 2131 return;
2128 2132
2129 // Windows uses the 4 lower order bits of |notification_code| for type- 2133 // Windows uses the 4 lower order bits of |notification_code| for type-
2130 // specific information so we must exclude this when comparing. 2134 // specific information so we must exclude this when comparing.
2131 static const int sc_mask = 0xFFF0; 2135 static const int sc_mask = 0xFFF0;
2132 // Ignore size/move/maximize in fullscreen mode. 2136 // Ignore size/move/maximize in fullscreen mode.
2133 if (IsFullscreen() && (((notification_code & sc_mask) == SC_SIZE) || 2137 if (IsFullscreen() && (((notification_code & sc_mask) == SC_SIZE) ||
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
2736 MONITORINFO monitor_info = {sizeof(monitor_info)}; 2740 MONITORINFO monitor_info = {sizeof(monitor_info)};
2737 GetMonitorInfo(MonitorFromWindow(hwnd(), MONITOR_DEFAULTTOPRIMARY), 2741 GetMonitorInfo(MonitorFromWindow(hwnd(), MONITOR_DEFAULTTOPRIMARY),
2738 &monitor_info); 2742 &monitor_info);
2739 gfx::Rect shrunk_rect(monitor_info.rcMonitor); 2743 gfx::Rect shrunk_rect(monitor_info.rcMonitor);
2740 shrunk_rect.set_height(shrunk_rect.height() - 1); 2744 shrunk_rect.set_height(shrunk_rect.height() - 1);
2741 background_fullscreen_hack_ = true; 2745 background_fullscreen_hack_ = true;
2742 SetBoundsInternal(shrunk_rect, false); 2746 SetBoundsInternal(shrunk_rect, false);
2743 } 2747 }
2744 2748
2745 } // namespace views 2749 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/win/hwnd_message_handler.h ('k') | ui/views/win/hwnd_message_handler_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698