diff options
author | Chris Michael <cp.michael@samsung.com> | 2014-07-29 13:28:20 -0400 |
---|---|---|
committer | Mike Blumenkrantz <zmike@osg.samsung.com> | 2014-08-13 10:22:52 -0400 |
commit | 2856232b9e5fcd942c416e4a255c5968c83c90f6 (patch) | |
tree | e5e44da90cf7350bb4054fa658db2947c909bd26 | |
parent | d9564105fb98b9145fac2e6b750a3b8167664f85 (diff) | |
download | enlightenment-2856232b9e5fcd942c416e4a255c5968c83c90f6.tar.gz |
Simplify both transient_set functions (wl_shell and xdg_shell).
Remove debugging noise.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
-rw-r--r-- | src/modules/wl_desktop_shell/e_mod_main.c | 67 |
1 files changed, 8 insertions, 59 deletions
diff --git a/src/modules/wl_desktop_shell/e_mod_main.c b/src/modules/wl_desktop_shell/e_mod_main.c index d4c5263bb6..060556f596 100644 --- a/src/modules/wl_desktop_shell/e_mod_main.c +++ b/src/modules/wl_desktop_shell/e_mod_main.c @@ -245,8 +245,6 @@ _e_shell_surface_cb_toplevel_set(struct wl_client *client EINA_UNUSED, struct wl { E_Client *ec; - DBG("WL_SHELL: Toplevel Set"); - /* get the client for this resource */ if (!(ec = wl_resource_get_user_data(resource))) { @@ -276,9 +274,6 @@ static void _e_shell_surface_cb_transient_set(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, struct wl_resource *parent_resource, int32_t x EINA_UNUSED, int32_t y EINA_UNUSED, uint32_t flags EINA_UNUSED) { E_Client *ec; - Ecore_Window pwin = 0; - - DBG("WL_SHELL: Transient Set"); if (!(ec = wl_resource_get_user_data(resource))) { @@ -287,29 +282,8 @@ _e_shell_surface_cb_transient_set(struct wl_client *client EINA_UNUSED, struct w return; } - if (parent_resource) - { - E_Pixmap *pp = NULL; - - if (!(pp = wl_resource_get_user_data(parent_resource))) - { - wl_resource_post_error(parent_resource, - WL_DISPLAY_ERROR_INVALID_OBJECT, - "No Pixmap For Parent Resource"); - return; - } - - pwin = e_pixmap_window_get(pp); - } - - ec->icccm.fetch.transient_for = EINA_TRUE; - ec->icccm.transient_for = pwin; - - ec->argb = EINA_TRUE; - ec->no_shape_cut = EINA_TRUE; - ec->borderless = !ec->internal; - ec->lock_border = EINA_TRUE; - ec->border.changed = ec->changes.border = !ec->borderless; + ec->netwm.type = E_WINDOW_TYPE_DIALOG; + ec->comp_data->set_win_type = EINA_TRUE; /* set this client as a transient for parent */ _e_shell_surface_parent_set(ec, parent_resource); @@ -322,8 +296,6 @@ _e_shell_surface_cb_fullscreen_set(struct wl_client *client EINA_UNUSED, struct { E_Client *ec; - DBG("SHELL: Surface Fullscreen Set"); - if (!(ec = wl_resource_get_user_data(resource))) { wl_resource_post_error(resource,WL_DISPLAY_ERROR_INVALID_OBJECT, @@ -340,8 +312,6 @@ _e_shell_surface_cb_popup_set(struct wl_client *client EINA_UNUSED, struct wl_re { E_Client *ec; - DBG("SHELL: Surface Popup Set"); - if (!(ec = wl_resource_get_user_data(resource))) { wl_resource_post_error(resource,WL_DISPLAY_ERROR_INVALID_OBJECT, @@ -584,8 +554,6 @@ _e_shell_cb_shell_surface_get(struct wl_client *client, struct wl_resource *reso E_Client *ec; E_Comp_Client_Data *cdata; - DBG("WL_SHELL: Surface Get %d", wl_resource_get_id(surface_resource)); - /* get the pixmap from this surface so we can find the client */ if (!(ep = wl_resource_get_user_data(surface_resource))) { @@ -674,7 +642,6 @@ static void _e_xdg_shell_surface_cb_transient_for_set(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, struct wl_resource *parent_resource) { E_Client *ec; - Ecore_Window pwin = 0; if (!(ec = wl_resource_get_user_data(resource))) { @@ -683,24 +650,6 @@ _e_xdg_shell_surface_cb_transient_for_set(struct wl_client *client EINA_UNUSED, return; } - if (parent_resource) - { - E_Pixmap *pp = NULL; - - if (!(pp = wl_resource_get_user_data(parent_resource))) - { - wl_resource_post_error(parent_resource, - WL_DISPLAY_ERROR_INVALID_OBJECT, - "No Pixmap For Parent Resource"); - return; - } - - pwin = e_pixmap_window_get(pp); - } - - ec->icccm.fetch.transient_for = EINA_TRUE; - ec->icccm.transient_for = pwin; - ec->netwm.type = E_WINDOW_TYPE_DIALOG; ec->comp_data->set_win_type = EINA_TRUE; @@ -711,12 +660,12 @@ _e_xdg_shell_surface_cb_transient_for_set(struct wl_client *client EINA_UNUSED, } static void -_e_xdg_shell_surface_cb_margin_set(struct wl_client *client EINA_UNUSED, struct wl_resource *resource EINA_UNUSED, int32_t l, int32_t r, int32_t t, int32_t b) +_e_xdg_shell_surface_cb_margin_set(struct wl_client *client EINA_UNUSED, struct wl_resource *resource EINA_UNUSED, int32_t l EINA_UNUSED, int32_t r EINA_UNUSED, int32_t t EINA_UNUSED, int32_t b EINA_UNUSED) { /* E_Client *ec; */ /* int32_t diff; */ - DBG("XDG_SHELL: Margin Set: %d %d %d %d", l, t, r, b); + /* DBG("XDG_SHELL: Margin Set: %d %d %d %d", l, t, r, b); */ /* get the client for this resource */ /* if (!(ec = wl_resource_get_user_data(resource))) */ @@ -1041,8 +990,8 @@ _e_xdg_shell_surface_configure(struct wl_resource *resource, Evas_Coord x, Evas_ { E_Client *ec; - DBG("XDG_SHELL: Surface Configure: %d \t%d %d %d %d", - wl_resource_get_id(resource), x, y, w, h); + /* DBG("XDG_SHELL: Surface Configure: %d \t%d %d %d %d", */ + /* wl_resource_get_id(resource), x, y, w, h); */ /* get the client for this resource */ if (!(ec = wl_resource_get_user_data(resource))) @@ -1149,7 +1098,7 @@ _e_xdg_shell_surface_map(struct wl_resource *resource) { E_Client *ec; - DBG("XDG_SHELL: Map Surface: %d", wl_resource_get_id(resource)); + /* DBG("XDG_SHELL: Map Surface: %d", wl_resource_get_id(resource)); */ /* get the client for this resource */ if (!(ec = wl_resource_get_user_data(resource))) @@ -1206,7 +1155,7 @@ _e_xdg_shell_cb_surface_get(struct wl_client *client, struct wl_resource *resour E_Client *ec; E_Comp_Client_Data *cdata; - DBG("XDG_SHELL: Surface Get %d", wl_resource_get_id(surface_resource)); + /* DBG("XDG_SHELL: Surface Get %d", wl_resource_get_id(surface_resource)); */ /* get the pixmap from this surface so we can find the client */ if (!(ep = wl_resource_get_user_data(surface_resource))) |