summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/browser_window_gtk.cc
diff options
context:
space:
mode:
authorderat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-30 00:48:16 +0000
committerderat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-30 00:48:16 +0000
commit4d023b86e67eea53d3a07dda4a516a1e74eeb69d (patch)
treeaab34aa24c601d55c2d52df1704e887d853b12b2 /chrome/browser/gtk/browser_window_gtk.cc
parent2d4f7dd2730272ae457e5ef10449a747fdd96a84 (diff)
downloadchromium_src-4d023b86e67eea53d3a07dda4a516a1e74eeb69d.zip
chromium_src-4d023b86e67eea53d3a07dda4a516a1e74eeb69d.tar.gz
chromium_src-4d023b86e67eea53d3a07dda4a516a1e74eeb69d.tar.bz2
Linux: Make InfoBubble use an override-redirect (popup) window.
This makes it work correctly in ion3 and other window managers that don't expect clients to try to move top-level windows themselves. This implementation grabs the pointer and keyboard. By doing this and using an override-redirect window, we should be able to avoid worrying about interactions with different window managers. The only downside (alluded to in the previous code) is that window manager keybindings don't make it through until the user dismisses the bubble by clicking outside of it or hitting Enter or Escape. I don't think this will be a problem; it's no different from what happens when you open a context menu in an app. BUG=20523 TEST=tested first-run and bookmark bubbles in Metacity, ion3, Fluxbox, KDE4, and the WM that I'm working on Review URL: http://codereview.chromium.org/198016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27578 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/browser_window_gtk.cc')
-rw-r--r--chrome/browser/gtk/browser_window_gtk.cc9
1 files changed, 1 insertions, 8 deletions
diff --git a/chrome/browser/gtk/browser_window_gtk.cc b/chrome/browser/gtk/browser_window_gtk.cc
index b617829..f6e85f1 100644
--- a/chrome/browser/gtk/browser_window_gtk.cc
+++ b/chrome/browser/gtk/browser_window_gtk.cc
@@ -1230,14 +1230,7 @@ void BrowserWindowGtk::ActiveWindowChanged(GdkWindow* active_window) {
if (!window_)
return;
- // If we lose focus to an info bubble, we don't want to seem inactive.
- // However we can only control this when we are painting a custom
- // frame. So if we lose focus BUT it's to one of our info bubbles AND we
- // are painting a custom frame, then paint as if we are active.
- const GtkWindow* info_bubble_toplevel =
- InfoBubbleGtk::GetToplevelForInfoBubble(active_window);
- bool is_active = (GTK_WIDGET(window_)->window == active_window ||
- (window_ == info_bubble_toplevel && UseCustomFrame()));
+ bool is_active = (GTK_WIDGET(window_)->window == active_window);
bool changed = (is_active != is_active_);
if (is_active && changed) {