[gtk+/wip/attachment-rectangle] toolbar: use event window as attachment rectangle
- From: William Hua <williamhua src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/attachment-rectangle] toolbar: use event window as attachment rectangle
- Date: Thu, 27 Aug 2015 10:16:57 +0000 (UTC)
commit 10cd1f5c6d838031283c5e8cc4ddd6be5225d68e
Author: William Hua <william hua canonical com>
Date: Thu Aug 27 10:55:54 2015 +0100
toolbar: use event window as attachment rectangle
gtk/gtktoolbar.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtktoolbar.c b/gtk/gtktoolbar.c
index 3fcf5fc..d50bd3d 100644
--- a/gtk/gtktoolbar.c
+++ b/gtk/gtktoolbar.c
@@ -2639,6 +2639,8 @@ show_menu (GtkToolbar *toolbar,
{
GtkToolbarPrivate *priv = toolbar->priv;
GdkAttachmentOptions options;
+ GdkWindow *event_window;
+ GdkRectangle rect;
rebuild_menu (toolbar);
@@ -2665,11 +2667,14 @@ show_menu (GtkToolbar *toolbar,
options |= GDK_ATTACHMENT_ATTACH_OPPOSITE_EDGE;
+ event_window = gtk_button_get_event_window (GTK_BUTTON (priv->arrow_button));
+ gdk_window_get_frame_extents (event_window, &rect);
+
gtk_menu_popup_against (priv->menu,
event ? event->device : NULL,
NULL,
- priv->arrow_button,
NULL,
+ &rect,
options,
NULL,
NULL,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]