summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/frame/browser_frame_gtk.cc
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-21 21:30:41 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-21 21:30:41 +0000
commitcbd7dcc7c93c7e73443abd6ddc6c140e2e7e98fd (patch)
treea5621b3aea39636f2e10399223097577b71f5bb5 /chrome/browser/views/frame/browser_frame_gtk.cc
parentdd6ef5991cf5f4b2b822db46832e0d78874efc24 (diff)
downloadchromium_src-cbd7dcc7c93c7e73443abd6ddc6c140e2e7e98fd.zip
chromium_src-cbd7dcc7c93c7e73443abd6ddc6c140e2e7e98fd.tar.gz
chromium_src-cbd7dcc7c93c7e73443abd6ddc6c140e2e7e98fd.tar.bz2
Gets status bubbles on views/gtk to correctly track when the parent
window is hidden/minimized/moved. This is made tricky by the fact that gtk doesn't have the notion of owned windows that automatically hidden along with the parent as windows does. BUG=none TEST=none directly, although covered by ui tests. Review URL: http://codereview.chromium.org/304008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29710 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/frame/browser_frame_gtk.cc')
-rw-r--r--chrome/browser/views/frame/browser_frame_gtk.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/chrome/browser/views/frame/browser_frame_gtk.cc b/chrome/browser/views/frame/browser_frame_gtk.cc
index 4b011b0..13b0ce1 100644
--- a/chrome/browser/views/frame/browser_frame_gtk.cc
+++ b/chrome/browser/views/frame/browser_frame_gtk.cc
@@ -6,6 +6,7 @@
#include "base/logging.h"
#include "chrome/browser/profile.h"
+#include "chrome/browser/status_bubble.h"
#include "chrome/browser/views/frame/browser_root_view.h"
#include "chrome/browser/views/frame/browser_view.h"
#include "chrome/browser/views/frame/opaque_browser_frame_view.h"
@@ -96,3 +97,21 @@ bool BrowserFrameGtk::GetAccelerator(int cmd_id,
views::Accelerator* accelerator) {
return browser_view_->GetAccelerator(cmd_id, accelerator);
}
+
+gboolean BrowserFrameGtk::OnWindowStateEvent(GtkWidget* widget,
+ GdkEventWindowState* event) {
+ gboolean result = views::WindowGtk::OnWindowStateEvent(widget, event);
+ if ((!IsVisible() || IsMinimized()) && browser_view_->GetStatusBubble()) {
+ // The window is effectively hidden. We have to hide the status bubble as
+ // unlike windows gtk has no notion of child windows that are hidden along
+ // with the parent.
+ browser_view_->GetStatusBubble()->Hide();
+ }
+ return result;
+}
+
+gboolean BrowserFrameGtk::OnConfigureEvent(GtkWidget* widget,
+ GdkEventConfigure* event) {
+ browser_view_->WindowMoved();
+ return views::WindowGtk::OnConfigureEvent(widget, event);
+}