From 8f08dc930c2380fff5c21bd4d6b8540b9145f7f8 Mon Sep 17 00:00:00 2001 From: Karl Heuer Date: Sat, 25 Oct 1997 03:12:31 +0000 Subject: [PATCH] (XTread_socket): Check for bogus (0,0) location. --- src/xterm.c | 10 ++++++++++ 1 file changed, 10 insertions(+) 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; -- 2.39.2