diff options
| author | Jan Djärv | 2002-10-03 17:53:23 +0000 |
|---|---|---|
| committer | Jan Djärv | 2002-10-03 17:53:23 +0000 |
| commit | 0331883833db885c1de2708379bb7b351d213680 (patch) | |
| tree | 07eec47d9f055ad02cab51df115031a68f7a95cd /src/xterm.c | |
| parent | 4c2f559e1616ec431bc2be357adbe6bc70db2edb (diff) | |
| download | emacs-0331883833db885c1de2708379bb7b351d213680.tar.gz emacs-0331883833db885c1de2708379bb7b351d213680.zip | |
* xterm.c (XTread_socket): For ConfigureNotify, with x and y == 0,
and USE_MOTIF, call XTranslateCoordinates to get the real x and y.
This is to also handle x/y changes that occur because of a resize.
Diffstat (limited to 'src/xterm.c')
| -rw-r--r-- | src/xterm.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/xterm.c b/src/xterm.c index 731f94e7e44..e457d6e4519 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -11179,8 +11179,24 @@ XTread_socket (sd, bufp, numchars, expected) | |||
| 11179 | in the emacs widget, which messes up Motif menus. */ | 11179 | in the emacs widget, which messes up Motif menus. */ |
| 11180 | if (event.xconfigure.x == 0 && event.xconfigure.y == 0) | 11180 | if (event.xconfigure.x == 0 && event.xconfigure.y == 0) |
| 11181 | { | 11181 | { |
| 11182 | event.xconfigure.x = f->output_data.x->widget->core.x; | 11182 | Window child; |
| 11183 | event.xconfigure.y = f->output_data.x->widget->core.y; | 11183 | int count; |
| 11184 | |||
| 11185 | /* We can get a ConfigureNotify because of a resize, | ||
| 11186 | so we can't just take x and y from the widget. | ||
| 11187 | Since this event may come on something else than | ||
| 11188 | the top level window, we can't use x_real_position | ||
| 11189 | either. So we get the root window x/y for 0/0 in | ||
| 11190 | the window in the event. */ | ||
| 11191 | count = x_catch_errors (FRAME_X_DISPLAY (f)); | ||
| 11192 | XTranslateCoordinates (FRAME_X_DISPLAY (f), | ||
| 11193 | event.xconfigure.window, | ||
| 11194 | FRAME_X_DISPLAY_INFO (f)->root_window, | ||
| 11195 | 0, 0, | ||
| 11196 | &event.xconfigure.x, | ||
| 11197 | &event.xconfigure.y, | ||
| 11198 | &child); | ||
| 11199 | x_uncatch_errors (FRAME_X_DISPLAY (f), count); | ||
| 11184 | } | 11200 | } |
| 11185 | #endif /* USE_MOTIF */ | 11201 | #endif /* USE_MOTIF */ |
| 11186 | } | 11202 | } |