From: Karl Heuer Date: Mon, 15 Mar 1999 19:53:32 +0000 (+0000) Subject: (XTread_socket) : X-Git-Tag: emacs-20.4~460 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=bf1b7b30dad9e42abca8f64ab14080124b641b48;p=emacs.git (XTread_socket) : If cursor pos is outside the new frame size, mark cursor as off. --- 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) f = x_top_window_to_frame (dpyinfo, event.xconfigure.window); if (f) { + int rows = PIXEL_TO_CHAR_HEIGHT (f, event.xconfigure.height); + int columns = PIXEL_TO_CHAR_WIDTH (f, event.xconfigure.width); #ifndef USE_X_TOOLKIT /* In the toolkit version, change_frame_size is called by the code that handles resizing of the EmacsFrame widget. */ - int rows = PIXEL_TO_CHAR_HEIGHT (f, event.xconfigure.height); - int columns = PIXEL_TO_CHAR_WIDTH (f, event.xconfigure.width); - /* Even if the number of character rows and columns has not changed, the font size may have changed, so we need to check the pixel dimensions as well. */ @@ -4531,7 +4530,16 @@ XTread_socket (sd, bufp, numchars, expected) event.xconfigure.y = f->output_data.x->widget->core.y; } #endif + /* If cursor was outside the new size, mark it as off. */ + if (f->phys_cursor_y >= rows + || f->phys_cursor_x >= columns) + { + f->phys_cursor_x = 0; + f->phys_cursor_y = 0; + f->phys_cursor_on = 0; + } } + goto OTHER; case ButtonPress: