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

Side by Side Diff: ui/views/win/hwnd_message_handler.cc

Issue 1162883003: Fix Z-order for a bubble when it appears for inactive window. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix CrOS Created 5 years, 6 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
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/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 <oleacc.h> 8 #include <oleacc.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 10
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 parent = ::GetWindow(hwnd(), GW_OWNER); 526 parent = ::GetWindow(hwnd(), GW_OWNER);
527 gfx::CenterAndSizeWindow(parent, hwnd(), size); 527 gfx::CenterAndSizeWindow(parent, hwnd(), size);
528 } 528 }
529 529
530 void HWNDMessageHandler::SetRegion(HRGN region) { 530 void HWNDMessageHandler::SetRegion(HRGN region) {
531 custom_window_region_.Set(region); 531 custom_window_region_.Set(region);
532 ResetWindowRegion(true, true); 532 ResetWindowRegion(true, true);
533 } 533 }
534 534
535 void HWNDMessageHandler::StackAbove(HWND other_hwnd) { 535 void HWNDMessageHandler::StackAbove(HWND other_hwnd) {
536 SetWindowPos(hwnd(), other_hwnd, 0, 0, 0, 0, 536 // Find a window above |other_hwnd|. If it exists, place hwnd() behind it.
537 // Otherwise, make hwnd() a top window.
sky 2015/06/02 16:32:57 Why does this need to change? Also, are we sure ot
vasilii 2015/06/03 13:47:39 The previous implementation should be called Stack
538 HWND next_window = GetNextWindow(other_hwnd, GW_HWNDPREV);
539 SetWindowPos(hwnd(), next_window ? next_window : HWND_TOP, 0, 0, 0, 0,
537 SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE); 540 SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE);
538 } 541 }
539 542
540 void HWNDMessageHandler::StackAtTop() { 543 void HWNDMessageHandler::StackAtTop() {
541 SetWindowPos(hwnd(), HWND_TOP, 0, 0, 0, 0, 544 SetWindowPos(hwnd(), HWND_TOP, 0, 0, 0, 0,
542 SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE); 545 SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE);
543 } 546 }
544 547
545 void HWNDMessageHandler::Show() { 548 void HWNDMessageHandler::Show() {
546 if (IsWindow(hwnd())) { 549 if (IsWindow(hwnd())) {
(...skipping 2189 matching lines...) Expand 10 before | Expand all | Expand 10 after
2736 SetWindowPos(hwnd(), NULL, 0, 0, 0, 0, flags | SWP_HIDEWINDOW); 2739 SetWindowPos(hwnd(), NULL, 0, 0, 0, 0, flags | SWP_HIDEWINDOW);
2737 SetWindowPos(hwnd(), NULL, 0, 0, 0, 0, flags | SWP_SHOWWINDOW); 2740 SetWindowPos(hwnd(), NULL, 0, 0, 0, 0, flags | SWP_SHOWWINDOW);
2738 } 2741 }
2739 // WM_DWMCOMPOSITIONCHANGED is only sent to top level windows, however we want 2742 // WM_DWMCOMPOSITIONCHANGED is only sent to top level windows, however we want
2740 // to notify our children too, since we can have MDI child windows who need to 2743 // to notify our children too, since we can have MDI child windows who need to
2741 // update their appearance. 2744 // update their appearance.
2742 EnumChildWindows(hwnd(), &SendDwmCompositionChanged, NULL); 2745 EnumChildWindows(hwnd(), &SendDwmCompositionChanged, NULL);
2743 } 2746 }
2744 2747
2745 } // namespace views 2748 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698