comparison src/xterm.c @ 24489:abf5b4802f9b

(XTread_socket) <ConfigureNotify>: If cursor pos is outside the new frame size, mark cursor as off.
author Karl Heuer <kwzh@gnu.org>
date Mon, 15 Mar 1999 19:53:32 +0000
parents d4ee4399e999
children 6f4ae209bbac
comparison
equal deleted inserted replaced
24488:a8e006544aa5 24489:abf5b4802f9b
4482 4482
4483 case ConfigureNotify: 4483 case ConfigureNotify:
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
4492 int rows = PIXEL_TO_CHAR_HEIGHT (f, event.xconfigure.height);
4493 int columns = PIXEL_TO_CHAR_WIDTH (f, event.xconfigure.width);
4494 4493
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. */
4498 if (columns != f->width 4497 if (columns != f->width
4529 { 4528 {
4530 event.xconfigure.x = f->output_data.x->widget->core.x; 4529 event.xconfigure.x = f->output_data.x->widget->core.x;
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:
4538 case ButtonRelease: 4546 case ButtonRelease:
4539 { 4547 {