#endif
static Lisp_Object id_to_xwidget_map;
+static Lisp_Object internal_xwidget_view_list;
+static Lisp_Object internal_xwidget_list;
static uint32_t xwidget_counter = 0;
#ifdef USE_GTK
xw->width = XFIXNAT (width);
xw->kill_without_query = false;
XSETXWIDGET (val, xw);
- Vxwidget_list = Fcons (val, Vxwidget_list);
+ internal_xwidget_list = Fcons (val, internal_xwidget_list);
+ Vxwidget_list = Fcopy_sequence (internal_xwidget_list);
xw->plist = Qnil;
xw->xwidget_id = ++xwidget_counter;
xw->find_text = NULL;
xw_list = Qnil;
- for (tail = Vxwidget_list; CONSP (tail); tail = XCDR (tail))
+ for (tail = internal_xwidget_list; CONSP (tail); tail = XCDR (tail))
{
xw = XCAR (tail);
if (XWIDGETP (xw) && EQ (Fxwidget_buffer (xw), buffer))
struct xwidget *xw;
GdkWindow *w;
- for (tem = Vxwidget_list; CONSP (tem); tem = XCDR (tem))
+ for (tem = internal_xwidget_list; CONSP (tem); tem = XCDR (tem))
{
if (XWIDGETP (XCAR (tem)))
{
xw->hit_result = webkit_hit_test_result_get_context (res);
- for (Lisp_Object tem = Vxwidget_view_list; CONSP (tem);
+ for (Lisp_Object tem = internal_xwidget_view_list; CONSP (tem);
tem = XCDR (tem))
{
if (XWIDGET_VIEW_P (XCAR (tem)))
{
block_input ();
- for (Lisp_Object tail = Vxwidget_view_list; CONSP (tail);
+ for (Lisp_Object tail = internal_xwidget_view_list; CONSP (tail);
tail = XCDR (tail))
{
if (XWIDGET_VIEW_P (XCAR (tail)))
Lisp_Object tem;
struct xwidget *xw;
- for (tem = Vxwidget_list; CONSP (tem); tem = XCDR (tem))
+ for (tem = internal_xwidget_list; CONSP (tem); tem = XCDR (tem))
{
if (XWIDGETP (XCAR (tem)))
{
Lisp_Object val;
XSETXWIDGET_VIEW (val, xv);
- Vxwidget_view_list = Fcons (val, Vxwidget_view_list);
+ internal_xwidget_view_list = Fcons (val, internal_xwidget_view_list);
+ Vxwidget_view_list = Fcopy_sequence (internal_xwidget_view_list);
XSETWINDOW (xv->w, s->w);
XSETXWIDGET (xv->model, xww);
nsxwidget_resize (xw);
#endif
- for (Lisp_Object tail = Vxwidget_view_list; CONSP (tail); tail = XCDR (tail))
+ for (Lisp_Object tail = internal_xwidget_view_list; CONSP (tail);
+ tail = XCDR (tail))
{
if (XWIDGET_VIEW_P (XCAR (tail)))
{
nsxwidget_delete_view (xv);
#endif
- Vxwidget_view_list = Fdelq (xwidget_view, Vxwidget_view_list);
+ internal_xwidget_view_list = Fdelq (xwidget_view, internal_xwidget_view_list);
+ Vxwidget_view_list = Fcopy_sequence (internal_xwidget_view_list);
return Qnil;
}
window = Fselected_window ();
CHECK_WINDOW (window);
- for (Lisp_Object tail = Vxwidget_view_list; CONSP (tail);
+ for (Lisp_Object tail = internal_xwidget_view_list; CONSP (tail);
tail = XCDR (tail))
{
Lisp_Object xwidget_view = XCAR (tail);
QCweakness, Qvalue);
staticpro (&id_to_xwidget_map);
+ internal_xwidget_list = Qnil;
+ staticpro (&internal_xwidget_list);
+ internal_xwidget_view_list = Qnil;
+ staticpro (&internal_xwidget_view_list);
+
#ifdef USE_GTK
x_window_to_xwv_map = CALLN (Fmake_hash_table, QCtest, Qeq);
xwidget_view_delete_all_in_window (struct window *w)
{
struct xwidget_view *xv = NULL;
- for (Lisp_Object tail = Vxwidget_view_list; CONSP (tail);
+ for (Lisp_Object tail = internal_xwidget_view_list; CONSP (tail);
tail = XCDR (tail))
{
if (XWIDGET_VIEW_P (XCAR (tail)))
static void
xwidget_start_redisplay (void)
{
- for (Lisp_Object tail = Vxwidget_view_list; CONSP (tail);
+ for (Lisp_Object tail = internal_xwidget_view_list; CONSP (tail);
tail = XCDR (tail))
{
if (XWIDGET_VIEW_P (XCAR (tail)))
}
}
- for (Lisp_Object tail = Vxwidget_view_list; CONSP (tail);
+ for (Lisp_Object tail = internal_xwidget_view_list; CONSP (tail);
tail = XCDR (tail))
{
if (XWIDGET_VIEW_P (XCAR (tail)))
{
Lisp_Object rem = Qnil;
- for (Lisp_Object tail = Vxwidget_view_list; CONSP (tail);
+ for (Lisp_Object tail = internal_xwidget_view_list; CONSP (tail);
tail = XCDR (tail))
{
if (XWIDGET_VIEW_P (XCAR (tail))
for (tail = Fget_buffer_xwidgets (buffer); CONSP (tail); tail = XCDR (tail))
{
xwidget = XCAR (tail);
- Vxwidget_list = Fdelq (xwidget, Vxwidget_list);
+ internal_xwidget_list = Fdelq (xwidget, internal_xwidget_list);
+ Vxwidget_list = Fcopy_sequence (internal_xwidget_list);
/* TODO free the GTK things in xw. */
{
CHECK_LIVE_XWIDGET (xwidget);