From: Karl Heuer Date: Sat, 25 Oct 1997 03:12:31 +0000 (+0000) Subject: (XTread_socket): Check for bogus (0,0) location. X-Git-Tag: emacs-20.3~2891 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8f08dc930c2380fff5c21bd4d6b8540b9145f7f8;p=emacs.git (XTread_socket): Check for bogus (0,0) location. --- diff --git a/src/xterm.c b/src/xterm.c index dce34e89031..5893fc8e84c 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -4479,6 +4479,16 @@ XTread_socket (sd, bufp, numchars, expected) f->output_data.x->win_gravity = NorthWestGravity; x_wm_set_size_hint (f, (long) 0, 0); } +#ifdef USE_MOTIF + /* Some window managers pass (0,0) as the location of + the window, and the Motif event handler stores it + in the emacs widget, which messes up Motif menus. */ + if (event.xconfigure.x == 0 && event.xconfigure.y == 0) + { + event.xconfigure.x = f->output_data.x->widget->core.x; + event.xconfigure.y = f->output_data.x->widget->core.y; + } +#endif } goto OTHER;