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

Side by Side Diff: ui/views/widget/native_widget_win.cc

Issue 10826058: Fix Windows XP and Vista taskbar activation issue. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Restore NativeWidgetWin::OnNCActivate DefWindowProc call on XP and Vista. Created 8 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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/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 1694 matching lines...) Expand 10 before | Expand all | Expand 10 after
1705 RDW_NOCHILDREN | RDW_INVALIDATE | RDW_UPDATENOW); 1705 RDW_NOCHILDREN | RDW_INVALIDATE | RDW_UPDATENOW);
1706 EnumChildWindows(GetNativeView(), EnumChildWindowsForRedraw, NULL); 1706 EnumChildWindows(GetNativeView(), EnumChildWindowsForRedraw, NULL);
1707 } 1707 }
1708 1708
1709 // If we're active again, we should be allowed to render as inactive, so 1709 // If we're active again, we should be allowed to render as inactive, so
1710 // tell the non-client view. 1710 // tell the non-client view.
1711 bool inactive_rendering_disabled = delegate_->IsInactiveRenderingDisabled(); 1711 bool inactive_rendering_disabled = delegate_->IsInactiveRenderingDisabled();
1712 if (IsActive()) 1712 if (IsActive())
1713 delegate_->EnableInactiveRendering(); 1713 delegate_->EnableInactiveRendering();
1714 1714
1715 // Avoid DefWindowProc non-client rendering over our custom frame. 1715 // Avoid DefWindowProc non-client rendering over our custom frame on newer
1716 if (!GetWidget()->ShouldUseNativeFrame()) { 1716 // Windows versions only (breaks taskbar activation indication on XP/Vista).
1717 if (!GetWidget()->ShouldUseNativeFrame() &&
1718 base::win::GetVersion() > base::win::VERSION_VISTA) {
1717 SetMsgHandled(TRUE); 1719 SetMsgHandled(TRUE);
1718 return TRUE; 1720 return TRUE;
1719 } 1721 }
1720 1722
1721 return DefWindowProcWithRedrawLock( 1723 return DefWindowProcWithRedrawLock(
1722 WM_NCACTIVATE, inactive_rendering_disabled || active, 0); 1724 WM_NCACTIVATE, inactive_rendering_disabled || active, 0);
1723 } 1725 }
1724 1726
1725 LRESULT NativeWidgetWin::OnNCCalcSize(BOOL mode, LPARAM l_param) { 1727 LRESULT NativeWidgetWin::OnNCCalcSize(BOOL mode, LPARAM l_param) {
1726 // We only override the default handling if we need to specify a custom 1728 // We only override the default handling if we need to specify a custom
(...skipping 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after
2759 // static 2761 // static
2760 bool NativeWidgetPrivate::IsTouchDown() { 2762 bool NativeWidgetPrivate::IsTouchDown() {
2761 // This currently isn't necessary because we're not generating touch events on 2763 // This currently isn't necessary because we're not generating touch events on
2762 // windows. When we do, this will need to be updated. 2764 // windows. When we do, this will need to be updated.
2763 return false; 2765 return false;
2764 } 2766 }
2765 2767
2766 } // namespace internal 2768 } // namespace internal
2767 2769
2768 } // namespace views 2770 } // namespace views
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698