is mandatory. Weirdly you get a FocusOut event when you click in
a widget-glyph but you don't get a correspondng FocusIn when you
click in the frame. Why is this? */
- if (in_p
-#if XtSpecificationRelease > 5
+ if (in_p
+#if XtSpecificationRelease > 5
&& FRAME_X_TEXT_WIDGET (f) != focus_widget
#endif
)
break;
case Expose:
- x_redraw_exposed_area (f, event->xexpose.x, event->xexpose.y,
- event->xexpose.width, event->xexpose.height);
+ if (!check_for_ignored_expose (f, event->xexpose.x, event->xexpose.y,
+ event->xexpose.width, event->xexpose.height)
+ &&
+ !find_matching_subwindow (f, event->xexpose.x, event->xexpose.y,
+ event->xexpose.width, event->xexpose.height))
+ x_redraw_exposed_area (f, event->xexpose.x, event->xexpose.y,
+ event->xexpose.width, event->xexpose.height);
break;
case GraphicsExpose: /* This occurs when an XCopyArea's source area was
/* Xt interval id's might not fit into an int (they're pointers, as it
happens), so we need to provide a conversion list. */
-struct Xt_timeout
+static struct Xt_timeout
{
int id;
XtIntervalId interval_id;
struct Xt_timeout *next;
} *pending_timeouts, *completed_timeouts;
-struct Xt_timeout_blocktype
+static struct Xt_timeout_blocktype
{
Blocktype_declare (struct Xt_timeout);
} *the_Xt_timeout_blocktype;
Xt_process_to_emacs_event (struct Lisp_Event *emacs_event)
{
int i;
- Lisp_Object process;
assert (process_events_occurred > 0);
+
for (i = 0; i < MAXDESC; i++)
{
- process = filedesc_with_input[i];
+ Lisp_Object process = filedesc_with_input[i];
if (PROCESSP (process))
- break;
+ {
+ filedesc_with_input[i] = Qnil;
+ process_events_occurred--;
+ /* process events have nil as channel */
+ emacs_event->event_type = process_event;
+ emacs_event->timestamp = 0; /* #### */
+ emacs_event->event.process.process = process;
+ return;
+ }
}
- assert (i < MAXDESC);
- filedesc_with_input[i] = Qnil;
- process_events_occurred--;
- /* process events have nil as channel */
- emacs_event->event_type = process_event;
- emacs_event->timestamp = 0; /* #### */
- emacs_event->event.process.process = process;
+ abort ();
}
static void
{
Lisp_Object console;
int infd;
-#ifdef HAVE_GPM
- int mousefd;
-#endif
if (CONSOLE_X_P (con))
return; /* X consoles are automatically selected for when we
infd = event_stream_unixoid_select_console (con);
XSETCONSOLE (console, con);
select_filedesc (infd, console);
-#ifdef HAVE_GPM
- /* On a stream device (ie: noninteractive), bad things can happen. */
- if (EQ (CONSOLE_TYPE (con), Qtty)) {
- mousefd = CONSOLE_TTY_MOUSE_FD (con);
- /* We check filedesc_to_what_closure[fd] here because if you run
- ** XEmacs from a TTY, it will fire up GPM, select the mouse fd, then
- ** if you run gnuattach to connect to another TTY, it will fire up
- ** GPM again, and try to reselect the mouse fd. GPM uses the same
- ** fd for every connection apparently, and select_filedesc will
- ** fail its assertion if we try to select it twice.
- */
- if ((mousefd >= 0) && !filedesc_to_what_closure[mousefd]) {
- select_filedesc (mousefd, console);
- }
- }
-#endif
}
static void
{
Lisp_Object console;
int infd;
-#ifdef HAVE_GPM
- int mousefd;
-#endif
if (CONSOLE_X_P (con))
return; /* X consoles are automatically selected for when we
infd = event_stream_unixoid_unselect_console (con);
XSETCONSOLE (console, con);
unselect_filedesc (infd);
-#ifdef HAVE_GPM
- /* On a stream device (ie: noninteractive), bad things can happen. */
- if (EQ (CONSOLE_TYPE (con), Qtty)) {
- mousefd = CONSOLE_TTY_MOUSE_FD (con);
- if (mousefd >= 0) {
- unselect_filedesc (mousefd);
- }
- }
-#endif
}
/* read an event from a tty, if one is available. Returns non-zero
}
void
-vars_of_event_Xt (void)
+reinit_vars_of_event_Xt (void)
{
- dispatch_event_queue = Qnil;
- staticpro (&dispatch_event_queue);
- dispatch_event_queue_tail = Qnil;
-
- /* this function only makes safe calls */
- init_what_input_once ();
-
Xt_event_stream = xnew (struct event_stream);
Xt_event_stream->event_pending_p = emacs_Xt_event_pending_p;
Xt_event_stream->next_event_cb = emacs_Xt_next_event;
Xt_event_stream->create_stream_pair_cb = emacs_Xt_create_stream_pair;
Xt_event_stream->delete_stream_pair_cb = emacs_Xt_delete_stream_pair;
+ the_Xt_timeout_blocktype = Blocktype_new (struct Xt_timeout_blocktype);
+
+ last_quit_check_signal_tick_count = 0;
+
+ /* this function only makes safe calls */
+ init_what_input_once ();
+}
+
+void
+vars_of_event_Xt (void)
+{
+ reinit_vars_of_event_Xt ();
+
+ dispatch_event_queue = Qnil;
+ staticpro (&dispatch_event_queue);
+ dispatch_event_queue_tail = Qnil;
+ pdump_wire (&dispatch_event_queue_tail);
+
DEFVAR_BOOL ("modifier-keys-are-sticky", &modifier_keys_are_sticky /*
*Non-nil makes modifier keys sticky.
This means that you can release the modifier key before pressing down
*/ );
x_debug_events = 0;
#endif
-
- the_Xt_timeout_blocktype = Blocktype_new (struct Xt_timeout_blocktype);
-
- last_quit_check_signal_tick_count = 0;
}
/* This mess is a hack that patches the shell widget to treat visual inheritance