devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=d73b3d1e704c9152a32bafb528e0bd653c69c764

commit d73b3d1e704c9152a32bafb528e0bd653c69c764
Author: Chris Michael <cp.mich...@samsung.com>
Date:   Tue Jun 9 09:43:34 2015 -0400

    wl-desktop-shell: Fix popup menu placement for xdg surfaces
    
    Signed-off-by: Chris Michael <cp.mich...@samsung.com>
---
 src/modules/wl_desktop_shell/e_mod_main.c | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/src/modules/wl_desktop_shell/e_mod_main.c 
b/src/modules/wl_desktop_shell/e_mod_main.c
index 08c911e..022a1bf 100644
--- a/src/modules/wl_desktop_shell/e_mod_main.c
+++ b/src/modules/wl_desktop_shell/e_mod_main.c
@@ -631,6 +631,7 @@ _e_xdg_shell_surface_configure_send(struct wl_resource 
*resource, uint32_t edges
        serial = wl_display_next_serial(e_comp->wl_comp_data->wl.disp);
        xdg_surface_send_configure(resource, width, height, &states, serial);
      }
+
    wl_array_release(&states);
 }
 
@@ -714,8 +715,8 @@ _e_xdg_shell_surface_cb_window_menu_show(struct wl_client 
*client EINA_UNUSED, s
         return;
      }
 
-     timestamp = ecore_loop_time_get();
-     e_int_client_menu_show(ec, x, y, 0, timestamp);
+   timestamp = ecore_loop_time_get();
+   e_int_client_menu_show(ec, x, y, 0, timestamp);
 }
 
 static void
@@ -985,8 +986,14 @@ _e_xdg_shell_surface_configure(struct wl_resource 
*resource, Evas_Coord x, Evas_
             (ec->netwm.type == E_WINDOW_TYPE_POPUP_MENU) ||
             (ec->netwm.type == E_WINDOW_TYPE_DROPDOWN_MENU))
           {
-             x = ec->parent->client.x + ec->comp_data->popup.x;
-             y = ec->parent->client.y + ec->comp_data->popup.y;
+             x = E_CLAMP(ec->parent->client.x + ec->comp_data->popup.x,
+                         ec->parent->client.x,
+                         ec->parent->client.x + 
+                         ec->parent->client.w - ec->client.w);
+             y = E_CLAMP(ec->parent->client.y + ec->comp_data->popup.y,
+                         ec->parent->client.y,
+                         ec->parent->client.y + 
+                         ec->parent->client.h - ec->client.h);
           }
      }
 

-- 


Reply via email to