diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-09 22:45:54 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-09 22:45:54 +0000 |
commit | 8564617a9d8593c4d8c20b9d99e33e51eaeadd59 (patch) | |
tree | ad5ca12715e344f08124d6fb0e4aaab31547630a /ui/views | |
parent | b7ffefb40cfb960410d018080c306723874510f3 (diff) | |
download | chromium_src-8564617a9d8593c4d8c20b9d99e33e51eaeadd59.zip chromium_src-8564617a9d8593c4d8c20b9d99e33e51eaeadd59.tar.gz chromium_src-8564617a9d8593c4d8c20b9d99e33e51eaeadd59.tar.bz2 |
Attempt 2 at: Makes detached tab dragging create a real browser. It's enabled on
aura (not in compact mode) and behind a flag on windows.
BUG=98345
TEST=make sure tab dragging still works on aura and windows both with
and without the flag 'Enable Tab Browser Dragging' enabled.
TBR=ben@chromium.org
Review URL: http://codereview.chromium.org/9109018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116940 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views')
-rw-r--r-- | ui/views/widget/native_widget_win.cc | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/ui/views/widget/native_widget_win.cc b/ui/views/widget/native_widget_win.cc index fbf3834..841177a 100644 --- a/ui/views/widget/native_widget_win.cc +++ b/ui/views/widget/native_widget_win.cc @@ -151,12 +151,14 @@ LRESULT CALLBACK MoveLoopMouseWatcher::KeyHook(int n_code, WPARAM w_param, LPARAM l_param) { if (n_code == HC_ACTION && w_param == VK_ESCAPE) { - int value = TRUE; - HRESULT result = DwmSetWindowAttribute( - instance_->host_->GetNativeView(), - DWMWA_TRANSITIONS_FORCEDISABLED, - &value, - sizeof(value)); + if (base::win::GetVersion() >= base::win::VERSION_VISTA) { + int value = TRUE; + HRESULT result = DwmSetWindowAttribute( + instance_->host_->GetNativeView(), + DWMWA_TRANSITIONS_FORCEDISABLED, + &value, + sizeof(value)); + } // Hide the window on escape, otherwise the window is visibly going to snap // back to the original location before we close it. // This behavior is specific to tab dragging, in that we generally wouldn't @@ -1127,9 +1129,11 @@ void NativeWidgetWin::EndMoveLoop() { } void NativeWidgetWin::SetVisibilityChangedAnimationsEnabled(bool value) { - int dwm_value = value ? FALSE : TRUE; - DwmSetWindowAttribute( - hwnd(), DWMWA_TRANSITIONS_FORCEDISABLED, &dwm_value, sizeof(dwm_value)); + if (base::win::GetVersion() >= base::win::VERSION_VISTA) { + int dwm_value = value ? FALSE : TRUE; + DwmSetWindowAttribute( + hwnd(), DWMWA_TRANSITIONS_FORCEDISABLED, &dwm_value, sizeof(dwm_value)); + } } //////////////////////////////////////////////////////////////////////////////// |