diff options
| author | Dmitry Antipov | 2013-08-01 09:56:20 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2013-08-01 09:56:20 +0400 |
| commit | 1ca6cc28eb0aa7a7c20059e3eb1078ac3b646d79 (patch) | |
| tree | 91af8359187f93858fdd25a54a52be40758d3d5d /src | |
| parent | c791c18e2364d4cabb2ebd317c963541a4c3bd5a (diff) | |
| download | emacs-1ca6cc28eb0aa7a7c20059e3eb1078ac3b646d79.tar.gz emacs-1ca6cc28eb0aa7a7c20059e3eb1078ac3b646d79.zip | |
* 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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/xterm.c | 19 |
2 files changed, 14 insertions, 9 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 40a1d22887e..566cd2b5961 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -3,6 +3,10 @@ | |||
| 3 | * xterm.c (last_mouse_press_frame): Remove the | 3 | * xterm.c (last_mouse_press_frame): Remove the |
| 4 | leftover which is not really used any more. | 4 | leftover which is not really used any more. |
| 5 | (handle_one_xevent, syms_of_xterm): Adjust users. | 5 | (handle_one_xevent, syms_of_xterm): Adjust users. |
| 6 | (x_flush): Call XFlush once per each X display, not frame. | ||
| 7 | This is better because this code always unconditionally skips | ||
| 8 | non-X frames in Vframe_list and issues the only XFlush if we | ||
| 9 | have more than one X frame on the same X display. | ||
| 6 | 10 | ||
| 7 | 2013-07-31 Dmitry Antipov <dmantipov@yandex.ru> | 11 | 2013-07-31 Dmitry Antipov <dmantipov@yandex.ru> |
| 8 | 12 | ||
diff --git a/src/xterm.c b/src/xterm.c index 9f4261f025e..99cfb029e64 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -287,8 +287,6 @@ enum xembed_message | |||
| 287 | XEMBED_ACTIVATE_ACCELERATOR = 14 | 287 | XEMBED_ACTIVATE_ACCELERATOR = 14 |
| 288 | }; | 288 | }; |
| 289 | 289 | ||
| 290 | /* Used in x_flush. */ | ||
| 291 | |||
| 292 | static bool x_alloc_nearest_color_1 (Display *, Colormap, XColor *); | 290 | static bool x_alloc_nearest_color_1 (Display *, Colormap, XColor *); |
| 293 | static void x_set_window_size_1 (struct frame *, int, int, int); | 291 | static void x_set_window_size_1 (struct frame *, int, int, int); |
| 294 | static void x_raise_frame (struct frame *); | 292 | static void x_raise_frame (struct frame *); |
| @@ -356,15 +354,18 @@ x_flush (struct frame *f) | |||
| 356 | return; | 354 | return; |
| 357 | 355 | ||
| 358 | block_input (); | 356 | block_input (); |
| 359 | if (f == NULL) | 357 | if (f) |
| 358 | { | ||
| 359 | eassert (FRAME_X_P (f)); | ||
| 360 | XFlush (FRAME_X_DISPLAY (f)); | ||
| 361 | } | ||
| 362 | else | ||
| 360 | { | 363 | { |
| 361 | Lisp_Object rest, frame; | 364 | /* Flush all displays and so all frames on them. */ |
| 362 | FOR_EACH_FRAME (rest, frame) | 365 | struct x_display_info *xdi; |
| 363 | if (FRAME_X_P (XFRAME (frame))) | 366 | for (xdi = x_display_list; xdi; xdi = xdi->next) |
| 364 | x_flush (XFRAME (frame)); | 367 | XFlush (xdi->display); |
| 365 | } | 368 | } |
| 366 | else if (FRAME_X_P (f)) | ||
| 367 | XFlush (FRAME_X_DISPLAY (f)); | ||
| 368 | unblock_input (); | 369 | unblock_input (); |
| 369 | } | 370 | } |
| 370 | 371 | ||