Commit 1ca6cc28 authored by Dmitry Antipov's avatar Dmitry Antipov
Browse files

* xterm.c (x_flush): Call XFlush once per each X display, not

frame.  This is better because this code always unconditionally
skips non-X frames in Vframe_list and issues the only XFlush if
we have more than one X frame on the same X display.
parent c791c18e
...@@ -3,6 +3,10 @@ ...@@ -3,6 +3,10 @@
* xterm.c (last_mouse_press_frame): Remove the * xterm.c (last_mouse_press_frame): Remove the
leftover which is not really used any more. leftover which is not really used any more.
(handle_one_xevent, syms_of_xterm): Adjust users. (handle_one_xevent, syms_of_xterm): Adjust users.
(x_flush): Call XFlush once per each X display, not frame.
This is better because this code always unconditionally skips
non-X frames in Vframe_list and issues the only XFlush if we
have more than one X frame on the same X display.
2013-07-31 Dmitry Antipov <dmantipov@yandex.ru> 2013-07-31 Dmitry Antipov <dmantipov@yandex.ru>
......
...@@ -287,8 +287,6 @@ enum xembed_message ...@@ -287,8 +287,6 @@ enum xembed_message
XEMBED_ACTIVATE_ACCELERATOR = 14 XEMBED_ACTIVATE_ACCELERATOR = 14
}; };
/* Used in x_flush. */
static bool x_alloc_nearest_color_1 (Display *, Colormap, XColor *); static bool x_alloc_nearest_color_1 (Display *, Colormap, XColor *);
static void x_set_window_size_1 (struct frame *, int, int, int); static void x_set_window_size_1 (struct frame *, int, int, int);
static void x_raise_frame (struct frame *); static void x_raise_frame (struct frame *);
...@@ -356,15 +354,18 @@ x_flush (struct frame *f) ...@@ -356,15 +354,18 @@ x_flush (struct frame *f)
return; return;
block_input (); block_input ();
if (f == NULL) if (f)
{
eassert (FRAME_X_P (f));
XFlush (FRAME_X_DISPLAY (f));
}
else
{ {
Lisp_Object rest, frame; /* Flush all displays and so all frames on them. */
FOR_EACH_FRAME (rest, frame) struct x_display_info *xdi;
if (FRAME_X_P (XFRAME (frame))) for (xdi = x_display_list; xdi; xdi = xdi->next)
x_flush (XFRAME (frame)); XFlush (xdi->display);
} }
else if (FRAME_X_P (f))
XFlush (FRAME_X_DISPLAY (f));
unblock_input (); unblock_input ();
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment