derekf pushed a commit to branch master.

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

commit 453e6adc33a1e1d117fbbdd6d06022f119e643a3
Author: Derek Foreman <der...@osg.samsung.com>
Date:   Thu Jun 23 11:21:27 2016 -0500

    Use e_client_util_is_popup for checking wayland clients
    
    All the different popup types are tested by the helper function,
    the current wayland tests were missing some.
---
 src/modules/wl_desktop_shell/e_mod_main.c | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/src/modules/wl_desktop_shell/e_mod_main.c 
b/src/modules/wl_desktop_shell/e_mod_main.c
index f840674..fc78084 100644
--- a/src/modules/wl_desktop_shell/e_mod_main.c
+++ b/src/modules/wl_desktop_shell/e_mod_main.c
@@ -498,9 +498,7 @@ _e_shell_surface_configure(struct wl_resource *resource, 
Evas_Coord x, Evas_Coor
 
    if (ec->parent)
      {
-        if ((ec->netwm.type == E_WINDOW_TYPE_MENU) ||
-            (ec->netwm.type == E_WINDOW_TYPE_POPUP_MENU) ||
-            (ec->netwm.type == E_WINDOW_TYPE_DROPDOWN_MENU))
+        if (e_client_util_is_popup(ec))
           {
              x = E_CLAMP(ec->parent->client.x + ec->comp_data->popup.x,
                          ec->parent->client.x,
@@ -664,7 +662,7 @@ _xdg_shell_surface_send_configure(struct wl_resource 
*resource, Eina_Bool fullsc
                                "No Client For Shell Surface");
         return;
      }
-   if (ec->netwm.type == E_WINDOW_TYPE_POPUP_MENU) return;
+   if (e_client_util_is_popup(ec)) return;
    focused = e_client_focused_get();
    if (ec == focused)
      activated = 1;
@@ -742,7 +740,7 @@ _e_xdg_shell_surface_configure_send(struct wl_resource 
*resource, uint32_t edges
         return;
      }
    if (e_object_is_del(E_OBJECT(ec))) return;
-   if (ec->netwm.type == E_WINDOW_TYPE_POPUP_MENU) return;
+   if (e_client_util_is_popup(ec)) return;
 
    _xdg_shell_surface_send_configure(resource, ec->fullscreen, !!ec->maximized 
|| ec->comp_data->max, edges, width, height);
 }
@@ -1158,9 +1156,7 @@ _e_xdg_shell_surface_configure(struct wl_resource 
*resource, Evas_Coord x, Evas_
 
    if (ec->parent)
      {
-        if ((ec->netwm.type == E_WINDOW_TYPE_MENU) ||
-            (ec->netwm.type == E_WINDOW_TYPE_POPUP_MENU) ||
-            (ec->netwm.type == E_WINDOW_TYPE_DROPDOWN_MENU))
+        if (e_client_util_is_popup(ec))
           {
              x = ec->parent->client.x + ec->comp_data->popup.x;
              y = ec->parent->client.y + ec->comp_data->popup.y;
@@ -1221,7 +1217,7 @@ _e_xdg_shell_surface_map(struct wl_resource *resource)
 
         /* FIXME: sometimes popup surfaces Do Not raise above their
          * respective parents... */
-        /* if (ec->netwm.type == E_WINDOW_TYPE_POPUP_MENU) */
+        /* if (e_client_util_is_popup(ec)) */
         /*   e_client_raise_latest_set(ec); */
      }
 }

-- 


Reply via email to