@@ -700,7 +700,7 @@ x_set_parent_frame (struct frame *f, Lisp_Object new_value, Lisp_Object old_valu
700700 int width = 0 , height = 0 ;
701701
702702 PGTK_TRACE ("x_set_parent_frame x: %d, y: %d, size: %d x %d" , f -> left_pos , f -> top_pos , width , height );
703- gtk_window_get_size (FRAME_X_WINDOW (f ), & width , & height );
703+ gtk_window_get_size (FRAME_NATIVE_WINDOW (f ), & width , & height );
704704
705705
706706 PGTK_TRACE ("x_set_parent_frame x: %d, y: %d, size: %d x %d" , f -> left_pos , f -> top_pos , width , height );
@@ -714,13 +714,14 @@ x_set_parent_frame (struct frame *f, Lisp_Object new_value, Lisp_Object old_valu
714714 error ("Invalid specification of `parent-frame'" );
715715 }
716716
717- if (p != FRAME_PARENT_FRAME (f ))
717+ if (p != FRAME_PARENT_FRAME (f )
718+ && (p != NULL ))
718719 {
719720 block_input ();
720- gtk_window_set_transient_for (FRAME_X_WINDOW (f ), FRAME_X_WINDOW (p ));
721- gtk_window_set_attached_to (FRAME_X_WINDOW (f ), FRAME_X_WINDOW (p ));
722- gtk_window_move (FRAME_X_WINDOW (f ), f -> left_pos , f -> top_pos );
723- gtk_window_set_keep_above (FRAME_X_WINDOW (f ), true);
721+ gtk_window_set_transient_for (FRAME_NATIVE_WINDOW (f ), FRAME_NATIVE_WINDOW (p ));
722+ gtk_window_set_attached_to (FRAME_NATIVE_WINDOW (f ), FRAME_GTK_WIDGET (p ));
723+ gtk_window_move (FRAME_NATIVE_WINDOW (f ), f -> left_pos , f -> top_pos );
724+ gtk_window_set_keep_above (FRAME_NATIVE_WINDOW (f ), true);
724725 //fill this in
725726 unblock_input ();
726727
@@ -2682,8 +2683,6 @@ pgtk_draw_window_cursor (struct window *w, struct glyph_row *glyph_row, int x,
26822683{
26832684 PGTK_TRACE ("draw_window_cursor: %d, %d, %d, %d, %d, %d." ,
26842685 x , y , cursor_type , cursor_width , on_p , active_p );
2685- struct frame * f = XFRAME (WINDOW_FRAME (w ));
2686- PGTK_TRACE ("%p\n" , f -> output_data .pgtk );
26872686
26882687 if (on_p )
26892688 {
0 commit comments