X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=gtk%2Fgtkdrawingarea.c;h=b1bcb49169a64a62abc6ba3a0eedf3925b04f262;hb=cb27c4b08c278ac7e8a882b638dbf30acd1436cf;hp=6f8272b15489891430421fad34217cc43c949890;hpb=c770fdd08adae9c92be3cb725e50bf2a20236f5a;p=~andy%2Fgtk diff --git a/gtk/gtkdrawingarea.c b/gtk/gtkdrawingarea.c index 6f8272b15..b1bcb4916 100644 --- a/gtk/gtkdrawingarea.c +++ b/gtk/gtkdrawingarea.c @@ -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 . */ /* @@ -27,6 +25,7 @@ #include "config.h" #include "gtkdrawingarea.h" #include "gtkintl.h" +#include "gtkstylecontext.h" /** @@ -122,11 +121,11 @@ * * To receive mouse events on a drawing area, you will need to enable * them with gtk_widget_add_events(). To receive keyboard events, you - * will need to set the #GTK_CAN_FOCUS flag on the drawing area, and + * will need to set the "can-focus" property on the drawing area, and you * should probably draw some user-visible indication that the drawing - * area is focused. Use the GTK_HAS_FOCUS() macro in your expose event + * area is focused. Use gtk_widget_has_focus() in your expose event * handler to decide whether to draw the focus indicator. See - * gtk_paint_focus() for one way to draw focus. + * gtk_render_focus() for one way to draw focus. */ static void gtk_drawing_area_realize (GtkWidget *widget); @@ -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),