X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=gtk%2Fgtkoffscreenwindow.c;h=8e9f23f02ce997649891ec1aa933c16e88b80851;hb=3c8e1c92a85b2e41161698f141747ced2c574f32;hp=ffa0e513e6abb30c01af75e5f36534780e7ce1ba;hpb=80ac6c97013873cf5b3dbceb2d003892b361b115;p=~andy%2Fgtk
diff --git a/gtk/gtkoffscreenwindow.c b/gtk/gtkoffscreenwindow.c
index ffa0e513e..8e9f23f02 100644
--- a/gtk/gtkoffscreenwindow.c
+++ b/gtk/gtkoffscreenwindow.c
@@ -10,9 +10,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see .
*
* Authors: Cody Russell
* Alexander Larsson
@@ -22,6 +20,7 @@
#include "gtkoffscreenwindow.h"
#include "gtkwidgetprivate.h"
+#include "gtkcontainerprivate.h"
#include "gtkprivate.h"
/**
@@ -163,14 +162,11 @@ gtk_offscreen_window_realize (GtkWidget *widget)
GdkWindow *window;
GdkWindowAttr attributes;
gint attributes_mask;
- gint border_width;
bin = GTK_BIN (widget);
gtk_widget_set_realized (widget, TRUE);
- border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
-
gtk_widget_get_allocation (widget, &allocation);
attributes.x = allocation.x;
@@ -187,15 +183,14 @@ gtk_offscreen_window_realize (GtkWidget *widget)
window = gdk_window_new (gtk_widget_get_parent_window (widget),
&attributes, attributes_mask);
gtk_widget_set_window (widget, window);
- gdk_window_set_user_data (window, widget);
+ gtk_widget_register_window (widget, window);
child = gtk_bin_get_child (bin);
if (child)
gtk_widget_set_parent_window (child, window);
- gtk_widget_style_attach (widget);
- gtk_style_set_background (gtk_widget_get_style (widget),
- window, GTK_STATE_NORMAL);
+ gtk_style_context_set_background (gtk_widget_get_style_context (widget),
+ window);
}
static void
@@ -225,13 +220,10 @@ static void
gtk_offscreen_window_show (GtkWidget *widget)
{
gboolean need_resize;
- GtkContainer *container;
_gtk_widget_set_visible_flag (widget, TRUE);
- container = GTK_CONTAINER (widget);
- need_resize = _gtk_container_get_need_resize (container) || !gtk_widget_get_realized (widget);
- _gtk_container_set_need_resize (container, FALSE);
+ need_resize = _gtk_widget_get_alloc_needed (widget) || !gtk_widget_get_realized (widget);
if (need_resize)
gtk_offscreen_window_resize (widget);