diff options
| author | Gerd Moellmann | 2001-03-13 14:36:25 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2001-03-13 14:36:25 +0000 |
| commit | 582c60f80e0aba5911c5031ea507878db879f880 (patch) | |
| tree | f094f2e6755e1a78530d629f3af6d4391f72b42f /src | |
| parent | 2564ea1bab87af39d46834dec3d618869153ee60 (diff) | |
| download | emacs-582c60f80e0aba5911c5031ea507878db879f880.tar.gz emacs-582c60f80e0aba5911c5031ea507878db879f880.zip | |
(XTread_socket) <LeaveNotify, EnterNotify>: Remove
workaround code for LessTif; it doesn't work anymore.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xterm.c | 54 |
1 files changed, 2 insertions, 52 deletions
diff --git a/src/xterm.c b/src/xterm.c index eaecea54102..4c90b835412 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -10236,43 +10236,9 @@ XTread_socket (sd, bufp, numchars, expected) | |||
| 10236 | 10236 | ||
| 10237 | case EnterNotify: | 10237 | case EnterNotify: |
| 10238 | { | 10238 | { |
| 10239 | int from_menu_bar_p = 0; | ||
| 10240 | |||
| 10241 | f = x_any_window_to_frame (dpyinfo, event.xcrossing.window); | 10239 | f = x_any_window_to_frame (dpyinfo, event.xcrossing.window); |
| 10242 | 10240 | ||
| 10243 | #ifdef LESSTIF_VERSION | 10241 | if (event.xcrossing.focus) |
| 10244 | /* When clicking outside of a menu bar popup to close | ||
| 10245 | it, we get a FocusIn/ EnterNotify sequence of | ||
| 10246 | events. The flag event.xcrossing.focus is not set | ||
| 10247 | in the EnterNotify event of that sequence because | ||
| 10248 | the focus is in the menu bar, | ||
| 10249 | event.xcrossing.window is the frame's X window. | ||
| 10250 | Unconditionally setting the focus frame to null in | ||
| 10251 | this case is not the right thing, because no event | ||
| 10252 | follows that could set the focus frame to the right | ||
| 10253 | value. | ||
| 10254 | |||
| 10255 | This could be a LessTif bug, but I wasn't able to | ||
| 10256 | reproduce the behavior in a simple test program. | ||
| 10257 | On the other hand, Motif seems to not have this | ||
| 10258 | problem. | ||
| 10259 | |||
| 10260 | (gerd, LessTif 0.92). */ | ||
| 10261 | |||
| 10262 | if (!event.xcrossing.focus | ||
| 10263 | && f | ||
| 10264 | && f->output_data.x->menubar_widget) | ||
| 10265 | { | ||
| 10266 | Window focus; | ||
| 10267 | int revert; | ||
| 10268 | |||
| 10269 | XGetInputFocus (FRAME_X_DISPLAY (f), &focus, &revert); | ||
| 10270 | if (focus == XtWindow (f->output_data.x->menubar_widget)) | ||
| 10271 | from_menu_bar_p = 1; | ||
| 10272 | } | ||
| 10273 | #endif /* LESSTIF_VERSION */ | ||
| 10274 | |||
| 10275 | if (event.xcrossing.focus || from_menu_bar_p) | ||
| 10276 | { | 10242 | { |
| 10277 | /* Avoid nasty pop/raise loops. */ | 10243 | /* Avoid nasty pop/raise loops. */ |
| 10278 | if (f && (!(f->auto_raise) | 10244 | if (f && (!(f->auto_raise) |
| @@ -10325,8 +10291,6 @@ XTread_socket (sd, bufp, numchars, expected) | |||
| 10325 | f = x_top_window_to_frame (dpyinfo, event.xcrossing.window); | 10291 | f = x_top_window_to_frame (dpyinfo, event.xcrossing.window); |
| 10326 | if (f) | 10292 | if (f) |
| 10327 | { | 10293 | { |
| 10328 | int from_menu_bar_p = 0; | ||
| 10329 | |||
| 10330 | if (f == dpyinfo->mouse_face_mouse_frame) | 10294 | if (f == dpyinfo->mouse_face_mouse_frame) |
| 10331 | { | 10295 | { |
| 10332 | /* If we move outside the frame, then we're | 10296 | /* If we move outside the frame, then we're |
| @@ -10351,21 +10315,7 @@ XTread_socket (sd, bufp, numchars, expected) | |||
| 10351 | bufp += n, count += n, numchars -= n; | 10315 | bufp += n, count += n, numchars -= n; |
| 10352 | } | 10316 | } |
| 10353 | 10317 | ||
| 10354 | #ifdef LESSTIF_VERSION | 10318 | if (event.xcrossing.focus) |
| 10355 | /* Please see the comment at the start of the | ||
| 10356 | EnterNotify case. */ | ||
| 10357 | if (!event.xcrossing.focus | ||
| 10358 | && f->output_data.x->menubar_widget) | ||
| 10359 | { | ||
| 10360 | Window focus; | ||
| 10361 | int revert; | ||
| 10362 | XGetInputFocus (FRAME_X_DISPLAY (f), &focus, &revert); | ||
| 10363 | if (focus == XtWindow (f->output_data.x->menubar_widget)) | ||
| 10364 | from_menu_bar_p = 1; | ||
| 10365 | } | ||
| 10366 | #endif /* LESSTIF_VERSION */ | ||
| 10367 | |||
| 10368 | if (event.xcrossing.focus || from_menu_bar_p) | ||
| 10369 | x_mouse_leave (dpyinfo); | 10319 | x_mouse_leave (dpyinfo); |
| 10370 | else | 10320 | else |
| 10371 | { | 10321 | { |