if (! FRAME_GTK_WIDGET (f) || ! (get_bg || get_fg))
return success_p;
- BLOCK_INPUT;
+ block_input ();
{
#ifdef HAVE_GTK3
GtkStyleContext *gsty
#endif
}
- UNBLOCK_INPUT;
+ unblock_input ();
return success_p;
}
if (!x->ttip_lbl) return 0;
- BLOCK_INPUT;
+ block_input ();
encoded_string = ENCODE_UTF_8 (string);
widget = GTK_WIDGET (x->ttip_lbl);
gwin = gtk_widget_get_window (GTK_WIDGET (x->ttip_window));
if (width) *width = req.width;
if (height) *height = req.height;
- UNBLOCK_INPUT;
+ unblock_input ();
return 1;
#endif /* USE_GTK_TOOLTIP */
struct x_output *x = f->output_data.x;
if (x->ttip_window)
{
- BLOCK_INPUT;
+ block_input ();
gtk_window_move (x->ttip_window, root_x, root_y);
gtk_widget_show_all (GTK_WIDGET (x->ttip_window));
- UNBLOCK_INPUT;
+ unblock_input ();
}
#endif
}
if (f->output_data.x->ttip_window)
{
GtkWindow *win = f->output_data.x->ttip_window;
- BLOCK_INPUT;
+ block_input ();
gtk_widget_hide (GTK_WIDGET (win));
if (g_object_get_data (G_OBJECT (win), "restore-tt"))
GtkSettings *settings = gtk_settings_get_for_screen (screen);
g_object_set (settings, "gtk-enable-tooltips", TRUE, NULL);
}
- UNBLOCK_INPUT;
+ unblock_input ();
ret = 1;
}
gpointer gdkwin;
GtkWidget *gwdesc = 0;
- BLOCK_INPUT;
+ block_input ();
gdkwin = gdk_x11_window_lookup_for_display (gdk_x11_lookup_xdisplay (dpy),
wdesc);
gwdesc = gtk_get_event_widget (&event);
}
- UNBLOCK_INPUT;
+ unblock_input ();
return gwdesc;
}
#endif
char *title = 0;
- BLOCK_INPUT;
+ block_input ();
if (FRAME_X_EMBEDDED_P (f))
{
if (whbox) gtk_widget_destroy (whbox);
if (wfixed) gtk_widget_destroy (wfixed);
- UNBLOCK_INPUT;
+ unblock_input ();
return 0;
}
}
}
- UNBLOCK_INPUT;
+ unblock_input ();
return 1;
}
&f->output_data.x->size_hints,
sizeof (size_hints)) != 0)
{
- BLOCK_INPUT;
+ block_input ();
gtk_window_set_geometry_hints (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
NULL, &size_hints, hint_flags);
f->output_data.x->size_hints = size_hints;
f->output_data.x->hint_flags = hint_flags;
- UNBLOCK_INPUT;
+ unblock_input ();
}
}
{
if (FRAME_GTK_WIDGET (f))
{
- BLOCK_INPUT;
+ block_input ();
xg_set_widget_bg (f, FRAME_GTK_WIDGET (f), FRAME_BACKGROUND_PIXEL (f));
- UNBLOCK_INPUT;
+ unblock_input ();
}
}
struct Lisp_Save_Value *p = XSAVE_VALUE (arg);
struct xg_dialog_data *dd = (struct xg_dialog_data *) p->pointer;
- BLOCK_INPUT;
+ block_input ();
if (dd->w) gtk_widget_destroy (dd->w);
if (dd->timerid != 0) g_source_remove (dd->timerid);
g_main_loop_quit (dd->loop);
g_main_loop_unref (dd->loop);
- UNBLOCK_INPUT;
+ unblock_input ();
return Qnil;
}
int filesel_done = 0;
xg_get_file_func func;
-#if defined (HAVE_PTHREAD) && defined (__SIGRTMIN)
- /* I really don't know why this is needed, but without this the GLIBC add on
- library linuxthreads hangs when the Gnome file chooser backend creates
- threads. */
- sigset_t blocked;
- sigemptyset (&blocked);
- sigaddset (&blocked, __SIGRTMIN);
- pthread_sigmask (SIG_BLOCK, &blocked, 0);
-#endif /* HAVE_PTHREAD */
-
#ifdef HAVE_GTK_FILE_SELECTION_NEW
if (xg_uses_old_file_dialog ())
gtk_widget_set_name (w, "emacs-filedialog");
filesel_done = xg_dialog_run (f, w);
-
-#if defined (HAVE_PTHREAD) && defined (__SIGRTMIN)
- pthread_sigmask (SIG_UNBLOCK, &blocked, 0);
-#endif
-
if (filesel_done == GTK_RESPONSE_OK)
fn = (*func) (w);
int done = 0;
Lisp_Object font = Qnil;
-#if defined (HAVE_PTHREAD) && defined (__SIGRTMIN)
- sigset_t blocked;
- sigemptyset (&blocked);
- sigaddset (&blocked, __SIGRTMIN);
- pthread_sigmask (SIG_BLOCK, &blocked, 0);
-#endif /* HAVE_PTHREAD */
-
w = gtk_font_chooser_dialog_new
("Pick a font", GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)));
gtk_widget_set_name (w, "emacs-fontdialog");
done = xg_dialog_run (f, w);
-
-#if defined (HAVE_PTHREAD) && defined (__SIGRTMIN)
- pthread_sigmask (SIG_UNBLOCK, &blocked, 0);
-#endif
-
if (done == GTK_RESPONSE_OK)
{
#if USE_NEW_GTK_FONT_CHOOSER
if (x->menubar_widget && gtk_widget_get_parent (x->menubar_widget))
return 0; /* Already done this, happens for frames created invisible. */
- BLOCK_INPUT;
+ block_input ();
gtk_box_pack_start (GTK_BOX (x->vbox_widget), x->menubar_widget,
FALSE, FALSE, 0);
FRAME_MENUBAR_HEIGHT (f) = req.height;
xg_height_or_width_changed (f);
}
- UNBLOCK_INPUT;
+ unblock_input ();
return 1;
}
if (x->menubar_widget)
{
- BLOCK_INPUT;
+ block_input ();
gtk_container_remove (GTK_CONTAINER (x->vbox_widget), x->menubar_widget);
/* The menubar and its children shall be deleted when removed from
x->menubar_widget = 0;
FRAME_MENUBAR_HEIGHT (f) = 0;
xg_height_or_width_changed (f);
- UNBLOCK_INPUT;
+ unblock_input ();
}
}
if (changed || int_gtk_range_get_value (GTK_RANGE (wscroll)) != value)
{
- BLOCK_INPUT;
+ block_input ();
/* gtk_range_set_value invokes the callback. Set
ignore_gtk_scrollbar to make the callback do nothing */
xg_ignore_gtk_scrollbar = 0;
- UNBLOCK_INPUT;
+ unblock_input ();
}
}
}
if (! FRAME_GTK_WIDGET (f))
return;
- BLOCK_INPUT;
+ block_input ();
if (RANGED_INTEGERP (1, Vtool_bar_button_margin, INT_MAX))
{
&& ! NILP (Fequal (tbinfo->style, style))
&& ! NILP (Fequal (tbinfo->last_tool_bar, f->tool_bar_items)))
{
- UNBLOCK_INPUT;
+ unblock_input ();
return;
}
xg_height_or_width_changed (f);
}
- UNBLOCK_INPUT;
+ unblock_input ();
}
/* Deallocate all resources for the tool bar on frame F.
{
struct xg_frame_tb_info *tbinfo;
int is_packed = x->handlebox_widget != 0;
- BLOCK_INPUT;
+ block_input ();
/* We may have created the toolbar_widget in xg_create_tool_bar, but
not the x->handlebox_widget which is created in xg_pack_tool_bar. */
if (is_packed)
xg_height_or_width_changed (f);
- UNBLOCK_INPUT;
+ unblock_input ();
}
}
if (! x->toolbar_widget || ! x->handlebox_widget)
return 1;
- BLOCK_INPUT;
+ block_input ();
g_object_ref (x->handlebox_widget);
if (x->toolbar_in_hbox)
gtk_container_remove (GTK_CONTAINER (x->hbox_widget),
if (xg_update_tool_bar_sizes (f))
xg_height_or_width_changed (f);
- UNBLOCK_INPUT;
+ unblock_input ();
return 1;
}