| OLD | NEW |
| 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 <shellapi.h> | 8 #include <shellapi.h> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 1230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1241 | 1241 |
| 1242 fullscreen_handler_->set_hwnd(hwnd()); | 1242 fullscreen_handler_->set_hwnd(hwnd()); |
| 1243 | 1243 |
| 1244 // This message initializes the window so that focus border are shown for | 1244 // This message initializes the window so that focus border are shown for |
| 1245 // windows. | 1245 // windows. |
| 1246 SendMessage(hwnd(), | 1246 SendMessage(hwnd(), |
| 1247 WM_CHANGEUISTATE, | 1247 WM_CHANGEUISTATE, |
| 1248 MAKELPARAM(UIS_CLEAR, UISF_HIDEFOCUS), | 1248 MAKELPARAM(UIS_CLEAR, UISF_HIDEFOCUS), |
| 1249 0); | 1249 0); |
| 1250 | 1250 |
| 1251 // Bug 964884: detach the IME attached to this window. | |
| 1252 // We should attach IMEs only when we need to input CJK strings. | |
| 1253 ImmAssociateContextEx(hwnd(), NULL, 0); | |
| 1254 | |
| 1255 if (remove_standard_frame_) { | 1251 if (remove_standard_frame_) { |
| 1256 SetWindowLong(hwnd(), GWL_STYLE, | 1252 SetWindowLong(hwnd(), GWL_STYLE, |
| 1257 GetWindowLong(hwnd(), GWL_STYLE) & ~WS_CAPTION); | 1253 GetWindowLong(hwnd(), GWL_STYLE) & ~WS_CAPTION); |
| 1258 SendFrameChanged(); | 1254 SendFrameChanged(); |
| 1259 } | 1255 } |
| 1260 | 1256 |
| 1261 // Get access to a modifiable copy of the system menu. | 1257 // Get access to a modifiable copy of the system menu. |
| 1262 GetSystemMenu(hwnd(), false); | 1258 GetSystemMenu(hwnd(), false); |
| 1263 | 1259 |
| 1264 if (base::win::GetVersion() >= base::win::VERSION_WIN7) | 1260 if (base::win::GetVersion() >= base::win::VERSION_WIN7) |
| (...skipping 845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2110 DwmExtendFrameIntoClientArea(hwnd(), &m); | 2106 DwmExtendFrameIntoClientArea(hwnd(), &m); |
| 2111 } | 2107 } |
| 2112 if (window_pos->flags & SWP_SHOWWINDOW) | 2108 if (window_pos->flags & SWP_SHOWWINDOW) |
| 2113 delegate_->HandleVisibilityChanged(true); | 2109 delegate_->HandleVisibilityChanged(true); |
| 2114 else if (window_pos->flags & SWP_HIDEWINDOW) | 2110 else if (window_pos->flags & SWP_HIDEWINDOW) |
| 2115 delegate_->HandleVisibilityChanged(false); | 2111 delegate_->HandleVisibilityChanged(false); |
| 2116 SetMsgHandled(FALSE); | 2112 SetMsgHandled(FALSE); |
| 2117 } | 2113 } |
| 2118 | 2114 |
| 2119 } // namespace views | 2115 } // namespace views |
| OLD | NEW |