Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Side by Side Diff: views/widget/native_widget_gtk.cc

Issue 7185005: Add View::ReorderChildView and Widget::MoveToTop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « views/widget/native_widget_gtk.h ('k') | views/widget/native_widget_views.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "views/widget/native_widget_gtk.h" 5 #include "views/widget/native_widget_gtk.h"
6 6
7 #include <gdk/gdk.h> 7 #include <gdk/gdk.h>
8 #include <gdk/gdkx.h> 8 #include <gdk/gdkx.h>
9 #include <X11/extensions/shape.h> 9 #include <X11/extensions/shape.h>
10 #include <X11/Xatom.h> 10 #include <X11/Xatom.h>
(...skipping 1044 matching lines...) Expand 10 before | Expand all | Expand 10 after
1055 void NativeWidgetGtk::SetBoundsConstrained(const gfx::Rect& bounds, 1055 void NativeWidgetGtk::SetBoundsConstrained(const gfx::Rect& bounds,
1056 Widget* other_widget) { 1056 Widget* other_widget) {
1057 // We apparently don't care about |other_widget|. 1057 // We apparently don't care about |other_widget|.
1058 SetBounds(bounds); 1058 SetBounds(bounds);
1059 } 1059 }
1060 1060
1061 void NativeWidgetGtk::MoveAbove(gfx::NativeView native_view) { 1061 void NativeWidgetGtk::MoveAbove(gfx::NativeView native_view) {
1062 ui::StackPopupWindow(GetNativeView(), native_view); 1062 ui::StackPopupWindow(GetNativeView(), native_view);
1063 } 1063 }
1064 1064
1065 void NativeWidgetGtk::MoveToTop() {
1066 DCHECK(GTK_IS_WINDOW(GetNativeView()));
1067 gtk_window_present(GTK_WINDOW(GetNativeView()));
1068 }
1069
1065 void NativeWidgetGtk::SetShape(gfx::NativeRegion region) { 1070 void NativeWidgetGtk::SetShape(gfx::NativeRegion region) {
1066 if (widget_ && widget_->window) { 1071 if (widget_ && widget_->window) {
1067 gdk_window_shape_combine_region(widget_->window, region, 0, 0); 1072 gdk_window_shape_combine_region(widget_->window, region, 0, 0);
1068 gdk_region_destroy(region); 1073 gdk_region_destroy(region);
1069 } 1074 }
1070 } 1075 }
1071 1076
1072 void NativeWidgetGtk::Close() { 1077 void NativeWidgetGtk::Close() {
1073 if (!widget_) 1078 if (!widget_)
1074 return; // No need to do anything. 1079 return; // No need to do anything.
(...skipping 1020 matching lines...) Expand 10 before | Expand all | Expand 10 after
2095 2100
2096 // And now, notify them that they have a brand new parent. 2101 // And now, notify them that they have a brand new parent.
2097 for (NativeWidgets::iterator it = widgets.begin(); 2102 for (NativeWidgets::iterator it = widgets.begin();
2098 it != widgets.end(); ++it) { 2103 it != widgets.end(); ++it) {
2099 (*it)->GetWidget()->NotifyNativeViewHierarchyChanged(true, 2104 (*it)->GetWidget()->NotifyNativeViewHierarchyChanged(true,
2100 new_parent); 2105 new_parent);
2101 } 2106 }
2102 } 2107 }
2103 2108
2104 } // namespace views 2109 } // namespace views
OLDNEW
« no previous file with comments | « views/widget/native_widget_gtk.h ('k') | views/widget/native_widget_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698