#endif
-#if defined USE_X_TOOLKIT || USE_GTK
static void
x_toolkit_position (struct frame *f, int x, int y,
bool *menu_bar_p, bool *tool_bar_p)
*tool_bar_p = gtk_widget_intersect (FRAME_X_OUTPUT (f)->toolbar_widget,
&test_rect, NULL);
}
-#else
+#elif defined USE_X_TOOLKIT
*menu_bar_p = (x > 0 && x < FRAME_PIXEL_WIDTH (f)
&& (y < 0 && y >= -FRAME_MENUBAR_HEIGHT (f)));
+#else
+ *menu_bar_p = (WINDOWP (f->menu_bar_window)
+ && (x > 0 && x < FRAME_PIXEL_WIDTH (f)
+ && (y > 0 && y < FRAME_MENU_BAR_HEIGHT (f))));
#endif
}
-#endif
static void
x_update_opaque_region (struct frame *f, XEvent *configure)
terminal->free_pixmap = x_free_pixmap;
terminal->delete_frame_hook = x_destroy_window;
terminal->delete_terminal_hook = x_delete_terminal;
-#if defined USE_X_TOOLKIT || defined USE_GTK
terminal->toolkit_position_hook = x_toolkit_position;
-#endif
/* Other hooks are NULL by default. */
return terminal;