Follow up fix to Bug#33294.
* src/gtkutil.c: Define xg_gtk_initialized.
(xg_initialize): Set it when GTK has finished initializing.
* src/gtkutil.h: Declare xg_gtk_initialized.
* src/xwidget.c (Fmake_xwidget): Error out if GTK has not been
initialized.
(xwidget_init_view): Likewise.
GtkTextDirection dir;
};
+bool xg_gtk_initialized; /* Used to make sure xwidget calls are possible */
+
static GtkWidget * xg_get_widget_from_map (ptrdiff_t idx);
\f
#ifdef HAVE_FREETYPE
x_last_font_name = NULL;
#endif
+
+ xg_gtk_initialized = true;
}
#endif /* USE_GTK */
to indicate that the callback should do nothing. */
extern bool xg_ignore_gtk_scrollbar;
+extern bool xg_gtk_initialized;
#endif /* USE_GTK */
#endif /* GTKUTIL_H */
Lisp_Object title, Lisp_Object width, Lisp_Object height,
Lisp_Object arguments, Lisp_Object buffer)
{
+ if (!xg_gtk_initialized)
+ error ("make-xwidget: GTK has not been initialized");
CHECK_SYMBOL (type);
CHECK_NATNUM (width);
CHECK_NATNUM (height);
struct glyph_string *s,
int x, int y)
{
+
+ if (!xg_gtk_initialized)
+ error ("xwidget_init_view: GTK has not been initialized");
+
struct xwidget_view *xv = allocate_xwidget_view ();
Lisp_Object val;