summaryrefslogtreecommitdiffstats
path: root/views/widget
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-27 21:27:48 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-27 21:27:48 +0000
commit2c1f804696b21c104eb684548495f960c432c9bb (patch)
tree5fee97813acaa674927e63cb28856ae49ff3b674 /views/widget
parent4d3b05dee1fe0de431cbc45bba0885673162359c (diff)
downloadchromium_src-2c1f804696b21c104eb684548495f960c432c9bb.zip
chromium_src-2c1f804696b21c104eb684548495f960c432c9bb.tar.gz
chromium_src-2c1f804696b21c104eb684548495f960c432c9bb.tar.bz2
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
Diffstat (limited to 'views/widget')
-rw-r--r--views/widget/widget_gtk.cc10
1 files changed, 8 insertions, 2 deletions
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() {