summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/first_run_bubble.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/first_run_bubble.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/first_run_bubble.cc')
-rw-r--r--chrome/browser/gtk/first_run_bubble.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/chrome/browser/gtk/first_run_bubble.cc b/chrome/browser/gtk/first_run_bubble.cc
index 12127bd..1d90194 100644
--- a/chrome/browser/gtk/first_run_bubble.cc
+++ b/chrome/browser/gtk/first_run_bubble.cc
@@ -137,9 +137,13 @@ FirstRunBubble::FirstRunBubble(Profile* profile,
gtk_box_pack_start(GTK_BOX(content_), bottom, FALSE, FALSE, 0);
// We want the focus to start on the keep entry, not on the change button.
- gtk_container_set_focus_child(GTK_CONTAINER(content_), keep_button);
+ gtk_widget_grab_focus(keep_button);
- bubble_ = InfoBubbleGtk::Show(parent_, rect, content_, theme_provider_, this);
+ bubble_ = InfoBubbleGtk::Show(parent_,
+ rect,
+ content_,
+ theme_provider_,
+ this); // delegate
if (!bubble_) {
NOTREACHED();
return;