]> git.eshelyaron.com Git - emacs.git/commitdiff
(XTread_socket): Check for bogus (0,0) location.
authorKarl Heuer <kwzh@gnu.org>
Sat, 25 Oct 1997 03:12:31 +0000 (03:12 +0000)
committerKarl Heuer <kwzh@gnu.org>
Sat, 25 Oct 1997 03:12:31 +0000 (03:12 +0000)
src/xterm.c

index dce34e890317edebe813f6c22e3c009afa9ca957..5893fc8e84c0dde374cd0b941ac5f9258a06ade8 100644 (file)
@@ -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;