diff options
| author | Karl Heuer | 1999-03-15 19:53:32 +0000 |
|---|---|---|
| committer | Karl Heuer | 1999-03-15 19:53:32 +0000 |
| commit | bf1b7b30dad9e42abca8f64ab14080124b641b48 (patch) | |
| tree | 2916f61d61d949dd5d52eb00c5577aeac3d57946 /src | |
| parent | 336911a14c7d518b789a08b24b492f1f949abd94 (diff) | |
| download | emacs-bf1b7b30dad9e42abca8f64ab14080124b641b48.tar.gz emacs-bf1b7b30dad9e42abca8f64ab14080124b641b48.zip | |
(XTread_socket) <ConfigureNotify>:
If cursor pos is outside the new frame size, mark cursor as off.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xterm.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/xterm.c b/src/xterm.c index d562a3d2b1a..e4c4e62095f 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -4484,14 +4484,13 @@ XTread_socket (sd, bufp, numchars, expected) | |||
| 4484 | f = x_top_window_to_frame (dpyinfo, event.xconfigure.window); | 4484 | f = x_top_window_to_frame (dpyinfo, event.xconfigure.window); |
| 4485 | if (f) | 4485 | if (f) |
| 4486 | { | 4486 | { |
| 4487 | int rows = PIXEL_TO_CHAR_HEIGHT (f, event.xconfigure.height); | ||
| 4488 | int columns = PIXEL_TO_CHAR_WIDTH (f, event.xconfigure.width); | ||
| 4487 | #ifndef USE_X_TOOLKIT | 4489 | #ifndef USE_X_TOOLKIT |
| 4488 | /* In the toolkit version, change_frame_size | 4490 | /* In the toolkit version, change_frame_size |
| 4489 | is called by the code that handles resizing | 4491 | is called by the code that handles resizing |
| 4490 | of the EmacsFrame widget. */ | 4492 | of the EmacsFrame widget. */ |
| 4491 | 4493 | ||
| 4492 | int rows = PIXEL_TO_CHAR_HEIGHT (f, event.xconfigure.height); | ||
| 4493 | int columns = PIXEL_TO_CHAR_WIDTH (f, event.xconfigure.width); | ||
| 4494 | |||
| 4495 | /* Even if the number of character rows and columns has | 4494 | /* Even if the number of character rows and columns has |
| 4496 | not changed, the font size may have changed, so we need | 4495 | not changed, the font size may have changed, so we need |
| 4497 | to check the pixel dimensions as well. */ | 4496 | to check the pixel dimensions as well. */ |
| @@ -4531,7 +4530,16 @@ XTread_socket (sd, bufp, numchars, expected) | |||
| 4531 | event.xconfigure.y = f->output_data.x->widget->core.y; | 4530 | event.xconfigure.y = f->output_data.x->widget->core.y; |
| 4532 | } | 4531 | } |
| 4533 | #endif | 4532 | #endif |
| 4533 | /* If cursor was outside the new size, mark it as off. */ | ||
| 4534 | if (f->phys_cursor_y >= rows | ||
| 4535 | || f->phys_cursor_x >= columns) | ||
| 4536 | { | ||
| 4537 | f->phys_cursor_x = 0; | ||
| 4538 | f->phys_cursor_y = 0; | ||
| 4539 | f->phys_cursor_on = 0; | ||
| 4540 | } | ||
| 4534 | } | 4541 | } |
| 4542 | |||
| 4535 | goto OTHER; | 4543 | goto OTHER; |
| 4536 | 4544 | ||
| 4537 | case ButtonPress: | 4545 | case ButtonPress: |