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

Side by Side Diff: ui/views/corewm/tooltip_win.cc

Issue 103143005: WinAura: don't create tooltip on hide (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years 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
« 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/corewm/tooltip_win.h" 5 #include "ui/views/corewm/tooltip_win.h"
6 6
7 #include <winuser.h> 7 #include <winuser.h>
8 8
9 #include "base/debug/stack_trace.h" 9 #include "base/debug/stack_trace.h"
10 #include "base/i18n/rtl.h" 10 #include "base/i18n/rtl.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 if (!EnsureTooltipWindow()) 127 if (!EnsureTooltipWindow())
128 return; 128 return;
129 129
130 SendMessage(tooltip_hwnd_, TTM_TRACKACTIVATE, 130 SendMessage(tooltip_hwnd_, TTM_TRACKACTIVATE,
131 TRUE, reinterpret_cast<LPARAM>(&toolinfo_)); 131 TRUE, reinterpret_cast<LPARAM>(&toolinfo_));
132 SetWindowPos(tooltip_hwnd_, HWND_TOPMOST, 0, 0, 0, 0, 132 SetWindowPos(tooltip_hwnd_, HWND_TOPMOST, 0, 0, 0, 0,
133 SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOOWNERZORDER | SWP_NOSIZE); 133 SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOOWNERZORDER | SWP_NOSIZE);
134 } 134 }
135 135
136 void TooltipWin::Hide() { 136 void TooltipWin::Hide() {
137 if (!EnsureTooltipWindow()) 137 if (!tooltip_hwnd_)
138 return; 138 return;
139 139
140 SendMessage(tooltip_hwnd_, TTM_TRACKACTIVATE, FALSE, 140 SendMessage(tooltip_hwnd_, TTM_TRACKACTIVATE, FALSE,
141 reinterpret_cast<LPARAM>(&toolinfo_)); 141 reinterpret_cast<LPARAM>(&toolinfo_));
142 } 142 }
143 143
144 bool TooltipWin::IsVisible() { 144 bool TooltipWin::IsVisible() {
145 return showing_; 145 return showing_;
146 } 146 }
147 147
148 } // namespace corewm 148 } // namespace corewm
149 } // namespace views 149 } // 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