]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkdrawingarea.c
stylecontext: Do invalidation on first resize container
[~andy/gtk] / gtk / gtkdrawingarea.c
index fc16e1532ce1c84806c12b65e442b2322ce2680d..b1bcb49169a64a62abc6ba3a0eedf3925b04f262 100644 (file)
@@ -12,9 +12,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 <http://www.gnu.org/licenses/>.
  */
 
 /*
@@ -27,6 +25,7 @@
 #include "config.h"
 #include "gtkdrawingarea.h"
 #include "gtkintl.h"
+#include "gtkstylecontext.h"
 
 
 /**
@@ -166,7 +165,6 @@ gtk_drawing_area_new (void)
 static void
 gtk_drawing_area_realize (GtkWidget *widget)
 {
-  GtkDrawingArea *darea = GTK_DRAWING_AREA (widget);
   GtkAllocation allocation;
   GdkWindow *window;
   GdkWindowAttr attributes;
@@ -195,7 +193,7 @@ gtk_drawing_area_realize (GtkWidget *widget)
 
       window = gdk_window_new (gtk_widget_get_parent_window (widget),
                                &attributes, attributes_mask);
-      gdk_window_set_user_data (window, darea);
+      gtk_widget_register_window (widget, window);
       gtk_widget_set_window (widget, window);
 
       gtk_style_context_set_background (gtk_widget_get_style_context (widget),