[mutter] keybindings: Correct coords for window menu for CSD windows
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] keybindings: Correct coords for window menu for CSD windows
- Date: Thu, 22 May 2014 14:51:41 +0000 (UTC)
commit 47d72680ffc9affe3d9b222e5f6bac0db3290718
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Thu May 22 10:32:31 2014 -0400
keybindings: Correct coords for window menu for CSD windows
src/core/keybindings.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/core/keybindings.c b/src/core/keybindings.c
index 25a4000..e21f03f 100644
--- a/src/core/keybindings.c
+++ b/src/core/keybindings.c
@@ -2728,12 +2728,17 @@ handle_activate_window_menu (MetaDisplay *display,
if (display->focus_window)
{
int x, y;
+ MetaRectangle frame_rect;
+ cairo_rectangle_int_t child_rect;
- meta_window_get_position (display->focus_window, &x, &y);
+ meta_window_get_frame_rect (display->focus_window, &frame_rect);
+ meta_window_get_client_area_rect (display->focus_window, &child_rect);
+ x = frame_rect.x + child_rect.x;
if (meta_ui_get_direction() == META_UI_DIRECTION_RTL)
- x += display->focus_window->rect.width;
+ x += child_rect.width;
+ y = frame_rect.y + child_rect.y;
meta_window_show_menu (display->focus_window, x, y);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]