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

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

Issue 300163002: Update window region after widget resizes not changing HWND size (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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/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 <wtsapi32.h> 10 #include <wtsapi32.h>
(...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after
860 if (!app_icon.isNull()) { 860 if (!app_icon.isNull()) {
861 HICON windows_icon = IconUtil::CreateHICONFromSkBitmap(*app_icon.bitmap()); 861 HICON windows_icon = IconUtil::CreateHICONFromSkBitmap(*app_icon.bitmap());
862 HICON old_icon = reinterpret_cast<HICON>( 862 HICON old_icon = reinterpret_cast<HICON>(
863 SendMessage(hwnd(), WM_SETICON, ICON_BIG, 863 SendMessage(hwnd(), WM_SETICON, ICON_BIG,
864 reinterpret_cast<LPARAM>(windows_icon))); 864 reinterpret_cast<LPARAM>(windows_icon)));
865 if (old_icon) 865 if (old_icon)
866 DestroyIcon(old_icon); 866 DestroyIcon(old_icon);
867 } 867 }
868 } 868 }
869 869
870 void HWNDMessageHandler::ForceWindowResized() {
871 delegate_->HandleClientSizeChanged(GetClientAreaBounds().size());
872 ResetWindowRegion(false, true);
873 }
874
870 //////////////////////////////////////////////////////////////////////////////// 875 ////////////////////////////////////////////////////////////////////////////////
871 // HWNDMessageHandler, InputMethodDelegate implementation: 876 // HWNDMessageHandler, InputMethodDelegate implementation:
872 877
873 void HWNDMessageHandler::DispatchKeyEventPostIME(const ui::KeyEvent& key) { 878 void HWNDMessageHandler::DispatchKeyEventPostIME(const ui::KeyEvent& key) {
874 SetMsgHandled(delegate_->HandleKeyEvent(key)); 879 SetMsgHandled(delegate_->HandleKeyEvent(key));
875 } 880 }
876 881
877 //////////////////////////////////////////////////////////////////////////////// 882 ////////////////////////////////////////////////////////////////////////////////
878 // HWNDMessageHandler, gfx::WindowImpl overrides: 883 // HWNDMessageHandler, gfx::WindowImpl overrides:
879 884
(...skipping 1530 matching lines...) Expand 10 before | Expand all | Expand 10 after
2410 POINT cursor_pos = {0}; 2415 POINT cursor_pos = {0};
2411 ::GetCursorPos(&cursor_pos); 2416 ::GetCursorPos(&cursor_pos);
2412 if (memcmp(&cursor_pos, &mouse_location, sizeof(POINT))) 2417 if (memcmp(&cursor_pos, &mouse_location, sizeof(POINT)))
2413 return false; 2418 return false;
2414 return true; 2419 return true;
2415 } 2420 }
2416 return false; 2421 return false;
2417 } 2422 }
2418 2423
2419 } // namespace views 2424 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698