     2drop window ungraft t ;
 
 :: connect-win-state-signals ( win -- )
-    win "expose-event" [ on-expose ]
+    win "expose-event" [ on-expose yield ]
     GtkWidget:expose-event connect-signal
-    win "configure-event" [ on-configure ]
+    win "configure-event" [ on-configure yield ]
     GtkWidget:configure-event connect-signal
-    win "delete-event" [ on-delete ]
+    win "delete-event" [ on-delete yield ]
     GtkWidget:delete-event connect-signal
-    win "map-event" [ on-map ]
+    win "map-event" [ on-map yield ]
     GtkWidget:map-event connect-signal ;
 
 ! Input methods

    im win gtk_widget_get_window gtk_im_context_set_client_window
    im f gtk_im_context_set_use_preedit

    im "commit" [ on-commit ]
    GtkIMContext:commit win connect-signal-with-data
    im "retrieve-surrounding" [ on-retrieve-surrounding ]
    GtkIMContext:retrieve-surrounding win connect-signal-with-data
    im "delete-surrounding" [ on-delete-surrounding ]
    GtkIMContext:delete-surrounding win connect-signal-with-data

    win "key-press-event" [ im-on-key-event ]
    GtkWidget:key-press-event im connect-signal-with-data
    win "key-release-event" [ im-on-key-event ]
    GtkWidget:key-release-event im connect-signal-with-data
    win "focus-in-event" [ im-on-focus-in ]
    GtkWidget:focus-out-event im connect-signal-with-data
    win "focus-out-event" [ im-on-focus-out ]
    GtkWidget:focus-out-event im connect-signal-with-data
    win "destroy" [ im-on-destroy ]
    GtkObject:destroy im connect-signal-with-data ;

! Window controls

        ] [ gtk_dialog_run drop ] bi
    ] with-destructors ;

M: gtk-ui-backend (with-ui)
    [
        0 gint <ref> f void* <ref> gtk_init
