return;
}
widget = GHB_WIDGET(ud->builder, "hb_window");
- xid = GDK_DRAWABLE_XID(widget->window);
+ xid = GDK_DRAWABLE_XID(gtk_widget_get_window(widget));
res = dbus_g_proxy_call(proxy, "Inhibit", &error,
G_TYPE_STRING, "ghb",
G_TYPE_UINT, xid,
GdkWindowState state;
window = GTK_WINDOW(GHB_WIDGET(ud->builder, "hb_window"));
- state = gdk_window_get_state(GTK_WIDGET(window)->window);
+ state = gdk_window_get_state(gtk_widget_get_window(GTK_WIDGET(window)));
if ((state & GDK_WINDOW_STATE_ICONIFIED) ||
(ud->hb_visibility != GDK_VISIBILITY_UNOBSCURED))
{
for (link = cc->drawables; link != NULL; link = link->next)
{
gtk_widget_realize(GTK_WIDGET(link->data));
- gdk_window_set_composited(GTK_WIDGET(link->data)->window, TRUE);
+ gdk_window_set_composited(gtk_widget_get_window(GTK_WIDGET(link->data)), TRUE);
}
}
}
| GDK_LEAVE_NOTIFY_MASK;
visible_window = !GTK_WIDGET_NO_WINDOW (widget);
+
+ GdkWindow *window;
if (visible_window)
{
attributes.visual = gtk_widget_get_visual (widget);
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
- widget->window = gdk_window_new(gtk_widget_get_parent_window (widget),
- &attributes, attributes_mask);
- gdk_window_set_user_data (widget->window, 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);
}
else
{
- widget->window = gtk_widget_get_parent_window (widget);
- g_object_ref (widget->window);
+ window = gtk_widget_get_parent_window (widget);
+ gtk_widget_set_window(widget, window);
+ g_object_ref (window);
}
- widget->style = gtk_style_attach (widget->style, widget->window);
+ widget->style = gtk_style_attach (widget->style, window);
if (visible_window)
- gtk_style_set_background(widget->style, widget->window,
+ gtk_style_set_background(widget->style, window,
GTK_STATE_NORMAL);
}
{
if (!GTK_WIDGET_NO_WINDOW (widget))
{
- gdk_window_move_resize (widget->window,
+ gdk_window_move_resize (gtk_widget_get_window(widget),
allocation->x + GTK_CONTAINER (widget)->border_width,
allocation->y + GTK_CONTAINER (widget)->border_width,
child_allocation.width,
if (compositor->children == NULL) return;
/* create a cairo context to draw to the window */
- cr = gdk_cairo_create (widget->window);
+ cr = gdk_cairo_create (gtk_widget_get_window(widget));
for (link = compositor->children; link != NULL; link = link->next)
{
continue;
/* the source data is the (composited) event box */
- gdk_cairo_set_source_pixmap (cr, child->window,
+ gdk_cairo_set_source_pixmap (cr, gtk_widget_get_window(child),
child->allocation.x,
child->allocation.y);
/* draw no more than our expose event intersects our child */
GstElement *xover;
#if GTK_CHECK_VERSION(2,18,0)
- if (!gdk_window_ensure_native(ud->preview->view->window))
+ if (!gdk_window_ensure_native(gtk_widget_get_window(ud->preview->view)))
{
g_message("Couldn't create native window for GstXOverlay. Disabling live preview.");
GtkWidget *widget = GHB_WIDGET(ud->builder, "live_preview_box");
#endif
#if !defined(_WIN32)
- ud->preview->xid = GDK_DRAWABLE_XID(ud->preview->view->window);
+ ud->preview->xid = GDK_DRAWABLE_XID(gtk_widget_get_window(ud->preview->view));
#else
- ud->preview->xid = GDK_WINDOW_HWND(ud->preview->view->window);
+ ud->preview->xid = GDK_WINDOW_HWND(gtk_widget_get_window(ud->preview->view));
#endif
ud->preview->play = gst_element_factory_make("playbin", "play");
xover = gst_element_factory_make("gconfvideosink", "xover");
ud->preview->width = preview_width;
ud->preview->height = preview_height;
}
- _draw_pixbuf(widget->window, ud->preview->pix);
+ _draw_pixbuf(gtk_widget_get_window(widget), ud->preview->pix);
gchar *text = g_strdup_printf("%d x %d", width, height);
widget = GHB_WIDGET (ud->builder, "preview_dims");
if (ud->preview->pix != NULL)
{
- _draw_pixbuf(widget->window, ud->preview->pix);
+ _draw_pixbuf(gtk_widget_get_window(widget), ud->preview->pix);
}
return TRUE;
}