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

Unified Diff: chrome/browser/ui/gtk/zoom_bubble_gtk.cc

Issue 10907168: [gtk] When mouse is inside of an auto-closing zoom bubble and the zoom is (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: init POD Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/gtk/zoom_bubble_gtk.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/zoom_bubble_gtk.cc
diff --git a/chrome/browser/ui/gtk/zoom_bubble_gtk.cc b/chrome/browser/ui/gtk/zoom_bubble_gtk.cc
index f8a130a6b0ac07aa8150ceb9e47889e9a372d010..0217db82db4a25395e692b1e7081003da4d06c9b 100644
--- a/chrome/browser/ui/gtk/zoom_bubble_gtk.cc
+++ b/chrome/browser/ui/gtk/zoom_bubble_gtk.cc
@@ -69,6 +69,7 @@ ZoomBubbleGtk::ZoomBubbleGtk(GtkWidget* anchor,
TabContents* tab_contents,
bool auto_close)
: auto_close_(auto_close),
+ mouse_inside_(false),
tab_contents_(tab_contents) {
GtkThemeService* theme_service =
GtkThemeService::GetFrom(Profile::FromBrowserContext(
@@ -156,7 +157,7 @@ void ZoomBubbleGtk::Refresh() {
}
void ZoomBubbleGtk::StartTimerIfNecessary() {
- if (auto_close_) {
+ if (auto_close_ && !mouse_inside_) {
Evan Stade 2012/09/11 08:28:56 prefer if (!auto_close_ || mouse_inside_) retur
Dan Beam 2012/09/11 16:33:41 Done.
if (timer_.IsRunning()) {
timer_.Reset();
} else {
@@ -195,11 +196,13 @@ void ZoomBubbleGtk::OnSetDefaultLinkClick(GtkWidget* widget) {
gboolean ZoomBubbleGtk::OnMouseEnter(GtkWidget* widget,
GdkEventCrossing* event) {
StopTimerIfNecessary();
+ mouse_inside_ = true;
return FALSE;
}
gboolean ZoomBubbleGtk::OnMouseLeave(GtkWidget* widget,
GdkEventCrossing* event) {
StartTimerIfNecessary();
+ mouse_inside_ = false;
Evan Stade 2012/09/11 08:28:56 wouldn't you need to put this before StartTimerIfN
Dan Beam 2012/09/11 16:33:41 Done.
return FALSE;
}
« no previous file with comments | « chrome/browser/ui/gtk/zoom_bubble_gtk.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698