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

@ -5313,10 +5313,12 @@ meta_window_recalc_features (MetaWindow *window)
}
void
meta_window_show_menu (MetaWindow *window)
meta_window_show_menu (MetaWindow *window,
int x,
int y)
{
g_return_if_fail (!window->override_redirect);
meta_compositor_show_window_menu (window->display->compositor, window);
meta_compositor_show_window_menu (window->display->compositor, window, x, y);
}
void
@ -7976,7 +7978,9 @@ meta_window_handle_ungrabbed_event (MetaWindow *window,
{
if (meta_prefs_get_raise_on_click ())
meta_window_raise (window);
meta_window_show_menu (window);
meta_window_show_menu (window,
event->button.x,
event->button.y);
return TRUE;
}
else if (fully_modified && (int) event->button.button == 1)