Mercurial > emacs
diff src/xterm.c @ 708:030fb4635335
*** empty log message ***
| author | Jim Blandy <jimb@redhat.com> |
|---|---|
| date | Wed, 10 Jun 1992 03:53:16 +0000 |
| parents | b0ddc138b0b5 |
| children | 540b047ece4d |
line wrap: on
line diff
--- a/src/xterm.c Wed Jun 10 02:47:07 1992 +0000 +++ b/src/xterm.c Wed Jun 10 03:53:16 1992 +0000 @@ -1465,10 +1465,9 @@ otherwise. */ result->kind = no_event; XSET (result->code, Lisp_Int, event->button); - XSET (result->timestamp, Lisp_Int, event->time); + result->timestamp = event->time; result->modifiers = (x_convert_modifiers (event->state) | (event->type == ButtonRelease ? up_modifier : 0)); - XSET (result->timestamp, Lisp_Int, (event->time & 0x7fffff)); /* Notice if the mouse is still grabbed. */ if (event->type == ButtonPress) @@ -1998,7 +1997,7 @@ XSET (bufp->code, Lisp_Int, (unsigned) keysym - 0xff50); bufp->screen = XSCREEN (SCREEN_FOCUS_SCREEN (s)); bufp->modifiers = x_convert_modifiers (modifiers); - XSET (bufp->timestamp, Lisp_Int, event.xkey.time); + bufp->timestamp = event.xkey.time; bufp++; count++; numchars--; @@ -2012,9 +2011,9 @@ if (modifiers & Mod1Mask) *copy_buffer |= METABIT; bufp->kind = ascii_keystroke; + XSET (bufp->code, Lisp_Int, *copy_buffer); bufp->screen = XSCREEN (SCREEN_FOCUS_SCREEN (s)); - XSET (bufp->code, Lisp_Int, *copy_buffer); - XSET (bufp->timestamp, Lisp_Int, event.xkey.time); + bufp->timestamp = event.xkey.time; bufp++; } else @@ -2022,8 +2021,8 @@ { bufp->kind = ascii_keystroke; XSET (bufp->code, Lisp_Int, copy_buffer[i]); - XSET (bufp->timestamp, Lisp_Int, event.xkey.time); bufp->screen = XSCREEN (SCREEN_FOCUS_SCREEN (s)); + bufp->timestamp = event.xkey.time; bufp++; } @@ -2167,14 +2166,12 @@ break; /* Entering our own subwindow. */ { - extern int waiting_for_input; struct screen *old_s = x_input_screen; s = x_window_to_screen (event.window); x_mouse_screen = s; - if (waiting_for_input && x_focus_screen == 0) - x_new_focus_screen (s); + x_new_focus_screen (s); } break; @@ -2592,6 +2589,14 @@ { struct screen_glyphs *current_glyphs = SCREEN_CURRENT_GLYPHS (s); + /* If we're not updating, then we want to use the current screen's + cursor position, not our local idea of where the cursor ought to be. */ + if (s != updating_screen) + { + curs_x = SCREEN_CURSOR_X (s); + curs_y = SCREEN_CURSOR_Y (s); + } + if (! s->visible) return; @@ -2605,8 +2610,8 @@ erase it. */ if (s->phys_cursor_x >= 0 && (!on - || s->phys_cursor_x != s->cursor_x - || s->phys_cursor_y != s->cursor_y + || s->phys_cursor_x != curs_x + || s->phys_cursor_y != curs_y || (s->display.x->text_cursor_kind != hollow_box_cursor && (s != x_highlight_screen)))) { @@ -2626,9 +2631,9 @@ && s == x_highlight_screen))) { s->phys_cursor_glyph - = ((current_glyphs->enable[s->cursor_y] - && s->cursor_x < current_glyphs->used[s->cursor_y]) - ? current_glyphs->glyphs[s->cursor_y][s->cursor_x] + = ((current_glyphs->enable[curs_y] + && curs_x < current_glyphs->used[curs_y]) + ? current_glyphs->glyphs[curs_y][curs_x] : SPACEGLYPH); if (s != x_highlight_screen) { @@ -2637,13 +2642,13 @@ } else { - x_draw_single_glyph (s, s->cursor_y, s->cursor_x, + x_draw_single_glyph (s, curs_y, curs_x, s->phys_cursor_glyph, 2); s->display.x->text_cursor_kind = filled_box_cursor; } - s->phys_cursor_x = s->cursor_x; - s->phys_cursor_y = s->cursor_y; + s->phys_cursor_x = curs_x; + s->phys_cursor_y = curs_y; } if (updating_screen != s)
