From 2c1f804696b21c104eb684548495f960c432c9bb Mon Sep 17 00:00:00 2001 From: "oshima@chromium.org" Date: Wed, 27 Jan 2010 21:27:48 +0000 Subject: MoveAbove/SetAlwaysOnTop implementation for WidgetGtk BUG=none TEST=none Review URL: http://codereview.chromium.org/548164 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37312 0039d316-1c4b-4281-b951-d872f2087c98 --- views/widget/widget_gtk.cc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'views/widget') diff --git a/views/widget/widget_gtk.cc b/views/widget/widget_gtk.cc index ecb131c..961dd85 100644 --- a/views/widget/widget_gtk.cc +++ b/views/widget/widget_gtk.cc @@ -427,7 +427,12 @@ void WidgetGtk::SetBounds(const gfx::Rect& bounds) { } void WidgetGtk::MoveAbove(Widget* widget) { - NOTIMPLEMENTED(); + DCHECK(widget_); + DCHECK(widget_->window); + // TODO(oshima): gdk_window_restack is not available in gtk2.0, so + // we're simply raising the window to the top. We should switch to + // gdk_window_restack when we upgrade gtk to 2.18 or up. + gdk_window_raise(widget_->window); } void WidgetGtk::SetShape(gfx::NativeRegion region) { @@ -496,7 +501,8 @@ void WidgetGtk::SetOpacity(unsigned char opacity) { } void WidgetGtk::SetAlwaysOnTop(bool on_top) { - NOTIMPLEMENTED(); + DCHECK(widget_); + gtk_window_set_keep_above(GTK_WINDOW(widget_), on_top); } RootView* WidgetGtk::GetRootView() { -- cgit v1.1