[Xfce4-commits] [xfce/xfwm4] 02/02: Fix window menu positioning with CSD

noreply at xfce.org noreply at xfce.org
Thu Feb 26 22:17:11 CET 2015


This is an automated email from the git hooks/post-receive script.

olivier pushed a commit to branch master
in repository xfce/xfwm4.

commit 72992ddb2e6ff17ee351df67db8576b8c5ad63d0
Author: Olivier Fourdan <fourdan at xfce.org>
Date:   Thu Feb 26 22:14:14 2015 +0100

    Fix window menu positioning with CSD
    
    Signed-off-by: Olivier Fourdan <fourdan at xfce.org>
---
 src/events.c |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/events.c b/src/events.c
index ba138c5..561cd5c 100644
--- a/src/events.c
+++ b/src/events.c
@@ -415,8 +415,8 @@ handleKeyPress (DisplayInfo *display_info, XKeyEvent * ev)
                 }
                 break;
             case KEY_POPUP_MENU:
-                show_window_menu (c, frameX (c) + frameLeft (c),
-                                     frameY (c) + frameTop (c),
+                show_window_menu (c, frameExtentX (c) + frameLeft (c),
+                                     frameExtentY (c) + frameTop (c),
                                      Button1, ev->time);
                 break;
             case KEY_FILL_WINDOW:
@@ -2413,7 +2413,7 @@ show_window_menu (Client *c, gint px, gint py, guint button, guint32 timestamp)
     gboolean is_transient;
     gint x, y;
 
-    TRACE ("entering show_window_menu");
+    TRACE ("entering show_window_menu (%d,%d)", px, py);
 
     if ((button != Button1) && (button != Button3))
     {
@@ -2434,7 +2434,10 @@ show_window_menu (Client *c, gint px, gint py, guint button, guint32 timestamp)
 
     c->button_status[MENU_BUTTON] = BUTTON_STATE_PRESSED;
     frameQueueDraw (c, FALSE);
-    y = (gdouble) c->y;
+    if (CLIENT_HAS_FRAME (c))
+    {
+        y = c->y;
+    }
     ops = MENU_OP_DELETE | MENU_OP_MINIMIZE_ALL | MENU_OP_WORKSPACES | MENU_OP_MOVE | MENU_OP_RESIZE;
     insensitive = 0;
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list