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/widget/native_widget_win.h" | 5 #include "ui/views/widget/native_widget_win.h" |
6 | 6 |
7 #include <dwmapi.h> | 7 #include <dwmapi.h> |
8 #include <shellapi.h> | 8 #include <shellapi.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 1295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1306 | 1306 |
1307 void NativeWidgetWin::OnDestroy() { | 1307 void NativeWidgetWin::OnDestroy() { |
1308 delegate_->OnNativeWidgetDestroying(); | 1308 delegate_->OnNativeWidgetDestroying(); |
1309 if (drop_target_.get()) { | 1309 if (drop_target_.get()) { |
1310 RevokeDragDrop(hwnd()); | 1310 RevokeDragDrop(hwnd()); |
1311 drop_target_ = NULL; | 1311 drop_target_ = NULL; |
1312 } | 1312 } |
1313 } | 1313 } |
1314 | 1314 |
1315 void NativeWidgetWin::OnDisplayChange(UINT bits_per_pixel, CSize screen_size) { | 1315 void NativeWidgetWin::OnDisplayChange(UINT bits_per_pixel, CSize screen_size) { |
1316 gfx::Screen::ReleaseCompatibleDC(); | |
sky
2012/02/03 18:34:06
This isn't the right place for a release, and it d
| |
1316 GetWidget()->widget_delegate()->OnDisplayChanged(); | 1317 GetWidget()->widget_delegate()->OnDisplayChanged(); |
1317 } | 1318 } |
1318 | 1319 |
1319 LRESULT NativeWidgetWin::OnDwmCompositionChanged(UINT msg, | 1320 LRESULT NativeWidgetWin::OnDwmCompositionChanged(UINT msg, |
1320 WPARAM w_param, | 1321 WPARAM w_param, |
1321 LPARAM l_param) { | 1322 LPARAM l_param) { |
1322 if (!GetWidget()->non_client_view()) { | 1323 if (!GetWidget()->non_client_view()) { |
1323 SetMsgHandled(FALSE); | 1324 SetMsgHandled(FALSE); |
1324 return 0; | 1325 return 0; |
1325 } | 1326 } |
(...skipping 1282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2608 return (GetKeyState(VK_LBUTTON) & 0x80) || | 2609 return (GetKeyState(VK_LBUTTON) & 0x80) || |
2609 (GetKeyState(VK_RBUTTON) & 0x80) || | 2610 (GetKeyState(VK_RBUTTON) & 0x80) || |
2610 (GetKeyState(VK_MBUTTON) & 0x80) || | 2611 (GetKeyState(VK_MBUTTON) & 0x80) || |
2611 (GetKeyState(VK_XBUTTON1) & 0x80) || | 2612 (GetKeyState(VK_XBUTTON1) & 0x80) || |
2612 (GetKeyState(VK_XBUTTON2) & 0x80); | 2613 (GetKeyState(VK_XBUTTON2) & 0x80); |
2613 } | 2614 } |
2614 | 2615 |
2615 } // namespace internal | 2616 } // namespace internal |
2616 | 2617 |
2617 } // namespace views | 2618 } // namespace views |
OLD | NEW |