diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-23 19:20:49 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-23 19:20:49 +0000 |
commit | f6017e4335b3ca6a13b64325cfab48291f84514a (patch) | |
tree | 2080982d2f4ec9226db7d633850799c7711bdbf3 /views/controls/native_control_gtk.cc | |
parent | cf61462348b622940a74a73d024e17415217cfd4 (diff) | |
download | chromium_src-f6017e4335b3ca6a13b64325cfab48291f84514a.zip chromium_src-f6017e4335b3ca6a13b64325cfab48291f84514a.tar.gz chromium_src-f6017e4335b3ca6a13b64325cfab48291f84514a.tar.bz2 |
Fix NativeViewHostGtk clipping.
Basically, I introduce an additional GtkFixed into the GtkWidget hierarchy. When clipping is required, this is re-created with a X Window and clipping is performed. For some reason, Gtk+Cairo won't clip rendering to the parent GtkWidget if there isn't an associated X Window.
This also fixes the GetPreferredSize implementation for NativeButtonGtk which would return ever increasing values of size each time it was called.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/159153
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21423 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls/native_control_gtk.cc')
-rw-r--r-- | views/controls/native_control_gtk.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/views/controls/native_control_gtk.cc b/views/controls/native_control_gtk.cc index b1ec8b7..5576f29 100644 --- a/views/controls/native_control_gtk.cc +++ b/views/controls/native_control_gtk.cc @@ -45,7 +45,9 @@ void NativeControlGtk::VisibilityChanged(View* starting_from, bool is_visible) { if (!is_visible) { // We destroy the child widget when we become invisible because of the // performance cost of maintaining widgets that aren't currently needed. + GtkWidget* widget = native_view(); Detach(); + gtk_widget_destroy(widget); } else if (!native_view()) { CreateNativeControl(); } |