diff options
Diffstat (limited to 'hildon/hildon-remote-texture.c')
-rw-r--r-- | hildon/hildon-remote-texture.c | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/hildon/hildon-remote-texture.c b/hildon/hildon-remote-texture.c index b39202d..3ee1741 100644 --- a/hildon/hildon-remote-texture.c +++ b/hildon/hildon-remote-texture.c @@ -80,12 +80,12 @@ hildon_remote_texture_realize (GtkWidget *widget) /* Set remote texture window type. */ - display = gdk_drawable_get_display (widget->window); + display = gdk_window_get_display (gtk_widget_get_window (widget)); wm_type = gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_WINDOW_TYPE"); applet_type = gdk_x11_get_xatom_by_name_for_display (display, "_HILDON_WM_WINDOW_TYPE_REMOTE_TEXTURE"); - XChangeProperty (GDK_DISPLAY_XDISPLAY (display), GDK_WINDOW_XID (widget->window), wm_type, + XChangeProperty (GDK_DISPLAY_XDISPLAY (display), GDK_WINDOW_XID (gtk_widget_get_window (widget)), wm_type, XA_ATOM, 32, PropModeReplace, (unsigned char *) &applet_type, 1); @@ -135,7 +135,7 @@ hildon_remote_texture_realize (GtkWidget *widget) /* Wait for a ready message */ - gdk_window_add_filter (widget->window, + gdk_window_add_filter (gtk_widget_get_window (widget), hildon_remote_texture_event_filter, widget); } @@ -143,7 +143,7 @@ hildon_remote_texture_realize (GtkWidget *widget) static void hildon_remote_texture_unrealize (GtkWidget *widget) { - gdk_window_remove_filter (widget->window, + gdk_window_remove_filter (gtk_widget_get_window (widget), hildon_remote_texture_event_filter, widget); @@ -272,8 +272,8 @@ hildon_remote_texture_update_ready (HildonRemoteTexture *self) HildonRemoteTexturePrivate *priv = HILDON_REMOTE_TEXTURE_GET_PRIVATE (self); GtkWidget *widget = GTK_WIDGET (self); - Display *display = GDK_WINDOW_XDISPLAY (widget->window); - Window window = GDK_WINDOW_XID (widget->window); + Display *display = GDK_WINDOW_XDISPLAY (gtk_widget_get_window (widget)); + Window window = GDK_WINDOW_XID (gtk_widget_get_window (widget)); int status; gint xerror; @@ -322,7 +322,7 @@ hildon_remote_texture_update_ready (HildonRemoteTexture *self) G_CALLBACK(hildon_remote_texture_map_event), self); - if (GTK_WIDGET_MAPPED (GTK_WIDGET (self))) + if (gtk_widget_get_mapped (GTK_WIDGET (self))) { gtk_widget_unmap (GTK_WIDGET (self)); gtk_widget_map (GTK_WIDGET (self)); @@ -430,8 +430,8 @@ hildon_remote_texture_send_message (HildonRemoteTexture *self, guint32 l4) { GtkWidget *widget = GTK_WIDGET (self); - Display *display = GDK_WINDOW_XDISPLAY (widget->window); - Window window = GDK_WINDOW_XID (widget->window); + Display *display = GDK_WINDOW_XDISPLAY (gtk_widget_get_window (widget)); + Window window = GDK_WINDOW_XID (gtk_widget_get_window (widget)); XEvent event = { 0 }; @@ -486,11 +486,11 @@ hildon_remote_texture_set_image (HildonRemoteTexture *self, priv->shm_height = height; priv->shm_bpp = bpp; - if (GTK_WIDGET_MAPPED (widget) && priv->ready) + if (gtk_widget_get_mapped (widget) && priv->ready) { /* Defer messages until the remote texture is parented * and the parent window is mapped */ - if (!priv->parent || !GTK_WIDGET_MAPPED (GTK_WIDGET (priv->parent))) + if (!priv->parent || !gtk_widget_get_mapped (GTK_WIDGET (priv->parent))) return; hildon_remote_texture_send_message (self, shm_atom, @@ -544,11 +544,11 @@ hildon_remote_texture_update_area (HildonRemoteTexture *self, } priv->set_damage = 1; - if (GTK_WIDGET_MAPPED (widget) && priv->ready) + if (gtk_widget_get_mapped (widget) && priv->ready) { /* Defer messages until the remote texture is parented * and the parent window is mapped */ - if (!priv->parent || !GTK_WIDGET_MAPPED (GTK_WIDGET (priv->parent))) + if (!priv->parent || !gtk_widget_get_mapped (GTK_WIDGET (priv->parent))) return; hildon_remote_texture_send_message (self, damage_atom, @@ -608,11 +608,11 @@ hildon_remote_texture_set_show_full (HildonRemoteTexture *self, priv->opacity = opacity; priv->set_show = 1; - if (GTK_WIDGET_MAPPED (widget) && priv->ready) + if (gtk_widget_get_mapped (widget) && priv->ready) { /* Defer show messages until the remote texture is parented * and the parent window is mapped */ - if (!priv->parent || !GTK_WIDGET_MAPPED (GTK_WIDGET (priv->parent))) + if (!priv->parent || !gtk_widget_get_mapped (GTK_WIDGET (priv->parent))) return; hildon_remote_texture_send_message (self, show_atom, @@ -703,12 +703,12 @@ hildon_remote_texture_set_position (HildonRemoteTexture *self, priv->height = height; priv->set_position = 1; - if (GTK_WIDGET_MAPPED (widget) && priv->ready) + if (gtk_widget_get_mapped (widget) && priv->ready) { /* Defer messages until the remote texture is parented * and the parent window is mapped */ - if (!priv->parent || !GTK_WIDGET_MAPPED (GTK_WIDGET (priv->parent))) + if (!priv->parent || !gtk_widget_get_mapped (GTK_WIDGET (priv->parent))) return; hildon_remote_texture_send_message (self, position_atom, @@ -747,12 +747,12 @@ hildon_remote_texture_set_offset (HildonRemoteTexture *self, priv->offset_y = y; priv->set_offset = 1; - if (GTK_WIDGET_MAPPED (widget) && priv->ready) + if (gtk_widget_get_mapped (widget) && priv->ready) { /* Defer messages until the remote texture is parented * and the parent window is mapped */ - if (!priv->parent || !GTK_WIDGET_MAPPED (GTK_WIDGET (priv->parent))) + if (!priv->parent || !gtk_widget_get_mapped (GTK_WIDGET (priv->parent))) return; hildon_remote_texture_send_message (self, offset_atom, @@ -783,11 +783,11 @@ hildon_remote_texture_set_scale (HildonRemoteTexture *self, priv->scale_y = y_scale; priv->set_scale = 1; - if (GTK_WIDGET_MAPPED (widget) && priv->ready) + if (gtk_widget_get_mapped (widget) && priv->ready) { /* Defer messages until the remote texture is parented * and the parent window is mapped */ - if (!priv->parent || !GTK_WIDGET_MAPPED (GTK_WIDGET (priv->parent))) + if (!priv->parent || !gtk_widget_get_mapped (GTK_WIDGET (priv->parent))) return; hildon_remote_texture_send_message (self, scale_atom, @@ -915,14 +915,14 @@ hildon_remote_texture_set_parent (HildonRemoteTexture *self, } } - if (GTK_WIDGET_MAPPED (widget) && priv->ready) + if (gtk_widget_get_mapped (widget) && priv->ready) { Window win = 0; /* If the remote texture is being unparented or parented to an * unmapped widget, force its visibility to "hidden". */ - if (!priv->parent || !GTK_WIDGET_MAPPED (GTK_WIDGET (priv->parent))) + if (!priv->parent || !gtk_widget_get_mapped (GTK_WIDGET (priv->parent))) { hildon_remote_texture_send_message (self, show_atom, @@ -937,10 +937,10 @@ hildon_remote_texture_set_parent (HildonRemoteTexture *self, if (priv->parent) { - if (!GTK_WIDGET_MAPPED (GTK_WIDGET (priv->parent))) + if (!gtk_widget_get_mapped (GTK_WIDGET (priv->parent))) return; - GdkWindow *gdk = GTK_WIDGET (parent)->window; + GdkWindow *gdk = gtk_widget_get_window (GTK_WIDGET (parent)); win = GDK_WINDOW_XID (gdk); } |