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

Side by Side Diff: chrome/views/custom_frame_window.cc

Issue 28240: Fix taskbar activation (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "chrome/views/custom_frame_window.h" 5 #include "chrome/views/custom_frame_window.h"
6 6
7 #include "base/gfx/point.h" 7 #include "base/gfx/point.h"
8 #include "base/gfx/size.h" 8 #include "base/gfx/size.h"
9 #include "base/win_util.h" 9 #include "base/win_util.h"
10 #include "chrome/common/gfx/path.h" 10 #include "chrome/common/gfx/path.h"
(...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after
990 990
991 // We can get WM_NCACTIVATE before we're actually visible. If we're not 991 // We can get WM_NCACTIVATE before we're actually visible. If we're not
992 // visible, no need to paint. 992 // visible, no need to paint.
993 if (IsWindowVisible(GetHWND())) { 993 if (IsWindowVisible(GetHWND())) {
994 non_client_view_->SchedulePaint(); 994 non_client_view_->SchedulePaint();
995 // We need to force a paint now, as a user dragging a window will block 995 // We need to force a paint now, as a user dragging a window will block
996 // painting operations while the move is in progress. 996 // painting operations while the move is in progress.
997 PaintNow(root_view_->GetScheduledPaintRect()); 997 PaintNow(root_view_->GetScheduledPaintRect());
998 } 998 }
999 999
1000 return TRUE; 1000 // Defering to our parent as it is important that the NCActivate message gets
1001 // DefProc'ed or the task bar won't show our process as active.
1002 // See bug http://crbug.com/4513.
1003 return Window::OnNCActivate(active);
1001 } 1004 }
1002 1005
1003 LRESULT CustomFrameWindow::OnNCCalcSize(BOOL mode, LPARAM l_param) { 1006 LRESULT CustomFrameWindow::OnNCCalcSize(BOOL mode, LPARAM l_param) {
1004 // We need to repaint all when the window bounds change. 1007 // We need to repaint all when the window bounds change.
1005 return WVR_REDRAW; 1008 return WVR_REDRAW;
1006 } 1009 }
1007 1010
1008 LRESULT CustomFrameWindow::OnNCHitTest(const CPoint& point) { 1011 LRESULT CustomFrameWindow::OnNCHitTest(const CPoint& point) {
1009 // NC points are in screen coordinates. 1012 // NC points are in screen coordinates.
1010 CPoint temp = point; 1013 CPoint temp = point;
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
1302 UINT message_flags = 0; 1305 UINT message_flags = 0;
1303 if ((GetKeyState(VK_CONTROL) & 0x80) == 0x80) 1306 if ((GetKeyState(VK_CONTROL) & 0x80) == 0x80)
1304 message_flags |= MK_CONTROL; 1307 message_flags |= MK_CONTROL;
1305 if ((GetKeyState(VK_SHIFT) & 0x80) == 0x80) 1308 if ((GetKeyState(VK_SHIFT) & 0x80) == 0x80)
1306 message_flags |= MK_SHIFT; 1309 message_flags |= MK_SHIFT;
1307 message_flags |= flags; 1310 message_flags |= flags;
1308 ProcessMousePressed(temp, message_flags, false, false); 1311 ProcessMousePressed(temp, message_flags, false, false);
1309 } 1312 }
1310 1313
1311 } // namespace views 1314 } // 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