cairo_t *cr;
/* Get a cairo_t */
- cr = gdk_cairo_create(clock->window);
+ cr = gdk_cairo_create(gtk_widget_get_window(clock));
cairo_rectangle(cr, event->area.x, event->area.y,
event->area.width, event->area.height);
{
GdkRegion *region;
- if (!widget->window)
+ if (!gtk_widget_get_window(widget))
return;
- region = gdk_drawable_get_clip_region(widget->window);
+ region = gdk_drawable_get_clip_region(gtk_widget_get_window(widget));
/* redraw the cairo canvas completely by exposing it */
- gdk_window_invalidate_region(widget->window, region, TRUE);
- gdk_window_process_updates(widget->window, TRUE);
+ gdk_window_invalidate_region(gtk_widget_get_window(widget), region, TRUE);
+ gdk_window_process_updates(gtk_widget_get_window(widget), TRUE);
gdk_region_destroy(region);
}
(void) iconwin; /* Unused parameter. */
d = GDK_DISPLAY_XDISPLAY(gdk_display_get_default());
- win_orig = GDK_WINDOW_XID(dockwin->window);
+ win_orig = GDK_WINDOW_XID(gtk_widget_get_window(dockwin));
XQueryTree(d, win_orig, &root, &p, &children, &nchildren);
g_signal_connect(dockwin, "destroy", G_CALLBACK(gtk_main_quit), NULL);
/* Sets the icon of dockwin as iconwin. */
- gdk_window_set_icon(dockwin->window, iconwin->window, NULL, NULL);
+ gdk_window_set_icon(gtk_widget_get_window(dockwin), gtk_widget_get_window(iconwin), NULL, NULL);
hvclock_init(iconwin);
gtk_widget_show(iconwin);
dockapp_gtk_withdrawn_hack(dockwin, iconwin);
#else
gtk_widget_show(dockwin);
- gdk_window_withdraw(dockwin->window);
+ gdk_window_withdraw(gtk_widget_get_window(dockwin));
#endif
}