Skip to content

Commit

Permalink
MoveAbove/SetAlwaysOnTop implementation for WidgetGtk
Browse files Browse the repository at this point in the history
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
  • Loading branch information
oshima@chromium.org committed Jan 27, 2010
1 parent 4d3b05d commit 2c1f804
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions views/widget/widget_gtk.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit 2c1f804

Please sign in to comment.