Get window
authorJohn Darrington <john@darrington.wattle.id.au>
Sun, 26 May 2013 15:52:48 +0000 (17:52 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Tue, 28 May 2013 14:04:04 +0000 (16:04 +0200)
src/ui/gui/pspp-sheet-view.c

index 79ba4da7422aebd56c78ffa91cc08ef3d0d30332..e994816349ad811533a2244b30f4fe81d1f190ae 100644 (file)
@@ -1463,9 +1463,9 @@ pspp_sheet_view_realize (GtkWidget *widget)
 
   /* Make the main, clipping window */
   attributes.window_type = GDK_WINDOW_CHILD;
-  attributes.x = widget->allocation.x;
-  attributes.y = widget->allocation.y;
-  attributes.width = widget->allocation.width;
+  attributes.x =      widget->allocation.x;
+  attributes.y =      widget->allocation.y;
+  attributes.width =  widget->allocation.width;
   attributes.height = widget->allocation.height;
   attributes.wclass = GDK_INPUT_OUTPUT;
   attributes.visual = gtk_widget_get_visual (widget);
@@ -4890,7 +4890,7 @@ pspp_sheet_view_key_press (GtkWidget   *widget,
       old_text = g_strdup (gtk_entry_get_text (GTK_ENTRY (tree_view->priv->search_entry)));
       new_event = gdk_event_copy ((GdkEvent *) event);
       g_object_unref (((GdkEventKey *) new_event)->window);
-      ((GdkEventKey *) new_event)->window = g_object_ref (tree_view->priv->search_window->window);
+      ((GdkEventKey *) new_event)->window = g_object_ref (gtk_widget_get_window (tree_view->priv->search_window));
       gtk_widget_realize (tree_view->priv->search_window);
 
       popup_menu_id = g_signal_connect (tree_view->priv->search_entry, 
@@ -8793,8 +8793,8 @@ typedef struct
 /* The window to which gtk_widget_get_window (widget) is relative */
 #define ALLOCATION_WINDOW(widget)              \
    (!gtk_widget_get_has_window (widget) ?              \
-    (widget)->window :                          \
-     gdk_window_get_parent ((widget)->window))
+    gtk_widget_get_window (widget) :                          \
+    gdk_window_get_parent (gtk_widget_get_window (widget)))
 
 static void
 adjust_allocation_recurse (GtkWidget *widget,