Add back coordinates to the window menu

It looks weird to have Alt+Space pop up under the cursor instead
of the top-left corner of the window, and the Wayland request will
pass through the coordinates as well.

Add it to the compositor interface, and extend the
_GTK_SHOW_WINDOW_MENU ClientMessage to support it as well.
This commit is contained in:
Jasper St. Pierre
2014-05-22 08:35:11 -04:00
parent 50b81fe4b9
commit 6513cbb470
12 changed files with 74 additions and 17 deletions

View File

@@ -2726,7 +2726,16 @@ handle_activate_window_menu (MetaDisplay *display,
gpointer dummy)
{
if (display->focus_window)
meta_window_show_menu (display->focus_window);
{
int x, y;
meta_window_get_position (display->focus_window, &x, &y);
if (meta_ui_get_direction() == META_UI_DIRECTION_RTL)
x += display->focus_window->rect.width;
meta_window_show_menu (display->focus_window, x, y);
}
}
static void