diff options
author | Bryce Harrington <bryce@osg.samsung.com> | 2015-02-24 17:34:20 -0500 |
---|---|---|
committer | Mike Blumenkrantz <zmike@osg.samsung.com> | 2015-02-24 17:34:20 -0500 |
commit | 89dbb9bd271f78122bffd2804004a1489b9877d8 (patch) | |
tree | 067d590c736e36b05faf91d189582ba967759d17 /src/modules | |
parent | 9e585e3f792a1b876a956021affd870634b66324 (diff) | |
download | enlightenment-89dbb9bd271f78122bffd2804004a1489b9877d8.tar.gz |
cosmetic: Whitespace cleanup of wayland client files
Summary:
cosmetic: Cleanup whitespace for wayland compositor
There is excess trailing whitespace in several of the files for the
wayland implementation. These patches attempt to apply the spacing
rules for Enlightenment as documented at:
https://phab.enlightenment.org/w/coding_convention/
The whitespace rules are applied using the following emacs tabbing
settings:
(defun start-efl-c-mode ()
"C mode with adjusted defaults for use with Enlightenment
development."
(interactive)
(c-mode)
(c-set-style "gnu")
(setq tab-width 8)
(setq indent-tabs-mode nil)
(setq c-basic-offset 3)
(setq defun-block-intro 3)
(setq statement-block-intro 3)
(setq case-label 1)
(setq statement-case-intro 3)
)
This patchset also eliminates all tabs in favor of whitespace, as per
the coding style rules.
Reviewers: zmike, cedric, devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2048
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/wl_desktop_shell/e_desktop_shell_protocol.c | 34 | ||||
-rw-r--r-- | src/modules/wl_desktop_shell/e_desktop_shell_protocol.h | 8 | ||||
-rw-r--r-- | src/modules/wl_desktop_shell/e_mod_main.c | 350 |
3 files changed, 196 insertions, 196 deletions
diff --git a/src/modules/wl_desktop_shell/e_desktop_shell_protocol.c b/src/modules/wl_desktop_shell/e_desktop_shell_protocol.c index f618a700cb..d09dd2487f 100644 --- a/src/modules/wl_desktop_shell/e_desktop_shell_protocol.c +++ b/src/modules/wl_desktop_shell/e_desktop_shell_protocol.c @@ -13,7 +13,7 @@ extern const struct wl_interface xdg_surface_interface; #pragma GCC diagnostic pop -static const struct wl_interface *types[] = +static const struct wl_interface *types[] = { NULL, NULL, @@ -36,13 +36,13 @@ static const struct wl_interface *types[] = NULL, &wl_seat_interface, NULL, - &wl_seat_interface, + &wl_seat_interface, NULL, NULL, &wl_output_interface, }; -static const struct wl_message xdg_shell_requests[] = +static const struct wl_message xdg_shell_requests[] = { { "use_unstable_version", "i", types + 0 }, { "get_xdg_surface", "no", types + 4 }, @@ -50,19 +50,19 @@ static const struct wl_message xdg_shell_requests[] = { "pong", "u", types + 0 }, }; -static const struct wl_message xdg_shell_events[] = +static const struct wl_message xdg_shell_events[] = { { "ping", "u", types + 0 }, }; -WL_EXPORT const struct wl_interface xdg_shell_interface = +WL_EXPORT const struct wl_interface xdg_shell_interface = { - "xdg_shell", 1, - 4, xdg_shell_requests, + "xdg_shell", 1, + 4, xdg_shell_requests, 1, xdg_shell_events, }; -static const struct wl_message xdg_surface_requests[] = +static const struct wl_message xdg_surface_requests[] = { { "destroy", "", types + 0 }, { "set_parent", "?o", types + 14 }, @@ -80,32 +80,32 @@ static const struct wl_message xdg_surface_requests[] = { "set_minimized", "", types + 0 }, }; -static const struct wl_message xdg_surface_events[] = +static const struct wl_message xdg_surface_events[] = { { "configure", "iiau", types + 0 }, { "close", "", types + 0 }, }; -WL_EXPORT const struct wl_interface xdg_surface_interface = +WL_EXPORT const struct wl_interface xdg_surface_interface = { - "xdg_surface", 1, - 14, xdg_surface_requests, + "xdg_surface", 1, + 14, xdg_surface_requests, 2, xdg_surface_events, }; -static const struct wl_message xdg_popup_requests[] = +static const struct wl_message xdg_popup_requests[] = { { "destroy", "", types + 0 }, }; -static const struct wl_message xdg_popup_events[] = +static const struct wl_message xdg_popup_events[] = { { "popup_done", "u", types + 0 }, }; -WL_EXPORT const struct wl_interface xdg_popup_interface = +WL_EXPORT const struct wl_interface xdg_popup_interface = { - "xdg_popup", 1, - 1, xdg_popup_requests, + "xdg_popup", 1, + 1, xdg_popup_requests, 1, xdg_popup_events, }; diff --git a/src/modules/wl_desktop_shell/e_desktop_shell_protocol.h b/src/modules/wl_desktop_shell/e_desktop_shell_protocol.h index a1724398fd..3cc1e702bc 100644 --- a/src/modules/wl_desktop_shell/e_desktop_shell_protocol.h +++ b/src/modules/wl_desktop_shell/e_desktop_shell_protocol.h @@ -39,7 +39,7 @@ struct xdg_shell_interface # define XDG_SHELL_PING 0 # define XDG_SHELL_PING_SINCE_VERSION 1 -static inline void +static inline void xdg_shell_send_ping(struct wl_resource *resource_, uint32_t serial) { wl_resource_post_event(resource_, XDG_SHELL_PING, serial); @@ -95,13 +95,13 @@ struct xdg_surface_interface # define XDG_SURFACE_CONFIGURE_SINCE_VERSION 1 # define XDG_SURFACE_CLOSE_SINCE_VERSION 1 -static inline void +static inline void xdg_surface_send_configure(struct wl_resource *resource_, int32_t w, int32_t h, struct wl_array *states, uint32_t serial) { wl_resource_post_event(resource_, XDG_SURFACE_CONFIGURE, w, h, states, serial); } -static inline void +static inline void xdg_surface_send_close(struct wl_resource *resource_) { wl_resource_post_event(resource_, XDG_SURFACE_CLOSE); @@ -115,7 +115,7 @@ struct xdg_popup_interface # define XDG_POPUP_POPUP_DONE 0 # define XDG_POPUP_POPUP_DONE_SINCE_VERSION 1 -static inline void +static inline void xdg_popup_send_popup_done(struct wl_resource *resource_, uint32_t serial) { wl_resource_post_event(resource_, XDG_POPUP_POPUP_DONE, serial); diff --git a/src/modules/wl_desktop_shell/e_mod_main.c b/src/modules/wl_desktop_shell/e_mod_main.c index 605667b395..4ac59c09eb 100644 --- a/src/modules/wl_desktop_shell/e_mod_main.c +++ b/src/modules/wl_desktop_shell/e_mod_main.c @@ -5,7 +5,7 @@ #define XDG_SERVER_VERSION 4 -static void +static void _e_shell_surface_parent_set(E_Client *ec, struct wl_resource *parent_resource) { E_Pixmap *pp; @@ -64,7 +64,7 @@ _e_shell_surface_parent_set(E_Client *ec, struct wl_resource *parent_resource) ec->icccm.transient_for = pwin; } -static void +static void _e_shell_surface_mouse_down_helper(E_Client *ec, E_Binding_Event_Mouse_Button *ev, Eina_Bool move) { if (move) @@ -72,7 +72,7 @@ _e_shell_surface_mouse_down_helper(E_Client *ec, E_Binding_Event_Mouse_Button *e /* tell E to start moving the client */ e_client_act_move_begin(ec, ev); - /* we have to get a reference to the window_move action here, or else + /* we have to get a reference to the window_move action here, or else * when e_client stops the move we will never get notified */ ec->cur_mouse_action = e_action_find("window_move"); if (ec->cur_mouse_action) @@ -83,7 +83,7 @@ _e_shell_surface_mouse_down_helper(E_Client *ec, E_Binding_Event_Mouse_Button *e /* tell E to start resizing the client */ e_client_act_resize_begin(ec, ev); - /* we have to get a reference to the window_resize action here, + /* we have to get a reference to the window_resize action here, * or else when e_client stops the resize we will never get notified */ ec->cur_mouse_action = e_action_find("window_resize"); if (ec->cur_mouse_action) @@ -109,7 +109,7 @@ _e_shell_surface_destroy(struct wl_resource *resource) { if (ec->comp_data->mapped) { - if ((ec->comp_data->shell.surface) && + if ((ec->comp_data->shell.surface) && (ec->comp_data->shell.unmap)) ec->comp_data->shell.unmap(ec->comp_data->shell.surface); } @@ -144,7 +144,7 @@ _e_shell_surface_cb_pong(struct wl_client *client EINA_UNUSED, struct wl_resourc } } -static void +static void _e_shell_surface_cb_move(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, struct wl_resource *seat_resource, uint32_t serial EINA_UNUSED) { E_Client *ec; @@ -154,8 +154,8 @@ _e_shell_surface_cb_move(struct wl_client *client EINA_UNUSED, struct wl_resourc /* get the client for this resource */ if (!(ec = wl_resource_get_user_data(resource))) { - wl_resource_post_error(resource, - WL_DISPLAY_ERROR_INVALID_OBJECT, + wl_resource_post_error(resource, + WL_DISPLAY_ERROR_INVALID_OBJECT, "No Client For Shell Surface"); return; } @@ -165,8 +165,8 @@ _e_shell_surface_cb_move(struct wl_client *client EINA_UNUSED, struct wl_resourc /* get compositor data from seat */ if (!(cdata = wl_resource_get_user_data(seat_resource))) { - wl_resource_post_error(seat_resource, - WL_DISPLAY_ERROR_INVALID_OBJECT, + wl_resource_post_error(seat_resource, + WL_DISPLAY_ERROR_INVALID_OBJECT, "No Comp_Data for Seat"); return; } @@ -187,15 +187,15 @@ _e_shell_surface_cb_move(struct wl_client *client EINA_UNUSED, struct wl_resourc break; } - e_comp_object_frame_xy_unadjust(ec->frame, - wl_fixed_to_int(cdata->ptr.x) + ec->client.x, - wl_fixed_to_int(cdata->ptr.y) + ec->client.y, + e_comp_object_frame_xy_unadjust(ec->frame, + wl_fixed_to_int(cdata->ptr.x) + ec->client.x, + wl_fixed_to_int(cdata->ptr.y) + ec->client.y, &ev.canvas.x, &ev.canvas.y); _e_shell_surface_mouse_down_helper(ec, &ev, EINA_TRUE); } -static void +static void _e_shell_surface_cb_resize(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, struct wl_resource *seat_resource, uint32_t serial EINA_UNUSED, uint32_t edges) { E_Client *ec; @@ -205,13 +205,13 @@ _e_shell_surface_cb_resize(struct wl_client *client EINA_UNUSED, struct wl_resou /* get the client for this resource */ if (!(ec = wl_resource_get_user_data(resource))) { - wl_resource_post_error(resource, - WL_DISPLAY_ERROR_INVALID_OBJECT, + wl_resource_post_error(resource, + WL_DISPLAY_ERROR_INVALID_OBJECT, "No Client For Shell Surface"); return; } - if ((edges == 0) || (edges > 15) || + if ((edges == 0) || (edges > 15) || ((edges & 3) == 3) || ((edges & 12) == 12)) return; if ((ec->maximized) || (ec->fullscreen)) return; @@ -219,8 +219,8 @@ _e_shell_surface_cb_resize(struct wl_client *client EINA_UNUSED, struct wl_resou /* get compositor data from seat */ if (!(cdata = wl_resource_get_user_data(seat_resource))) { - wl_resource_post_error(seat_resource, - WL_DISPLAY_ERROR_INVALID_OBJECT, + wl_resource_post_error(seat_resource, + WL_DISPLAY_ERROR_INVALID_OBJECT, "No Comp_Data for Seat"); return; } @@ -248,15 +248,15 @@ _e_shell_surface_cb_resize(struct wl_client *client EINA_UNUSED, struct wl_resou break; } - e_comp_object_frame_xy_unadjust(ec->frame, - wl_fixed_to_int(cdata->ptr.x) + ec->client.x, - wl_fixed_to_int(cdata->ptr.y) + ec->client.y, + e_comp_object_frame_xy_unadjust(ec->frame, + wl_fixed_to_int(cdata->ptr.x) + ec->client.x, + wl_fixed_to_int(cdata->ptr.y) + ec->client.y, &ev.canvas.x, &ev.canvas.y); _e_shell_surface_mouse_down_helper(ec, &ev, EINA_FALSE); } -static void +static void _e_shell_surface_cb_toplevel_set(struct wl_client *client EINA_UNUSED, struct wl_resource *resource) { E_Client *ec; @@ -264,8 +264,8 @@ _e_shell_surface_cb_toplevel_set(struct wl_client *client EINA_UNUSED, struct wl /* get the client for this resource */ if (!(ec = wl_resource_get_user_data(resource))) { - wl_resource_post_error(resource, - WL_DISPLAY_ERROR_INVALID_OBJECT, + wl_resource_post_error(resource, + WL_DISPLAY_ERROR_INVALID_OBJECT, "No Client For Shell Surface"); return; } @@ -284,7 +284,7 @@ _e_shell_surface_cb_toplevel_set(struct wl_client *client EINA_UNUSED, struct wl EC_CHANGED(ec); } -static void +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; @@ -302,7 +302,7 @@ _e_shell_surface_cb_transient_set(struct wl_client *client EINA_UNUSED, struct w EC_CHANGED(ec); } -static void +static void _e_shell_surface_cb_fullscreen_set(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, uint32_t method EINA_UNUSED, uint32_t framerate EINA_UNUSED, struct wl_resource *output_resource EINA_UNUSED) { E_Client *ec; @@ -318,7 +318,7 @@ _e_shell_surface_cb_fullscreen_set(struct wl_client *client EINA_UNUSED, struct e_client_fullscreen(ec, e_config->fullscreen_policy); } -static void +static void _e_shell_surface_cb_popup_set(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, struct wl_resource *seat_resource EINA_UNUSED, uint32_t serial EINA_UNUSED, struct wl_resource *parent_resource, int32_t x, int32_t y, uint32_t flags EINA_UNUSED) { E_Client *ec; @@ -350,7 +350,7 @@ _e_shell_surface_cb_popup_set(struct wl_client *client EINA_UNUSED, struct wl_re EC_CHANGED(ec); } -static void +static void _e_shell_surface_cb_maximized_set(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, struct wl_resource *output_resource EINA_UNUSED) { E_Client *ec; @@ -360,8 +360,8 @@ _e_shell_surface_cb_maximized_set(struct wl_client *client EINA_UNUSED, struct w /* get the client for this resource */ if (!(ec = wl_resource_get_user_data(resource))) { - wl_resource_post_error(resource, - WL_DISPLAY_ERROR_INVALID_OBJECT, + wl_resource_post_error(resource, + WL_DISPLAY_ERROR_INVALID_OBJECT, "No Client For Shell Surface"); return; } @@ -371,7 +371,7 @@ _e_shell_surface_cb_maximized_set(struct wl_client *client EINA_UNUSED, struct w { unsigned int edges = 0; - e_client_maximize(ec, ((e_config->maximize_policy & E_MAXIMIZE_TYPE) | + e_client_maximize(ec, ((e_config->maximize_policy & E_MAXIMIZE_TYPE) | E_MAXIMIZE_BOTH)); edges = (WL_SHELL_SURFACE_RESIZE_TOP | WL_SHELL_SURFACE_RESIZE_LEFT); @@ -379,7 +379,7 @@ _e_shell_surface_cb_maximized_set(struct wl_client *client EINA_UNUSED, struct w } } -static void +static void _e_shell_surface_cb_title_set(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, const char *title) { E_Client *ec; @@ -387,8 +387,8 @@ _e_shell_surface_cb_title_set(struct wl_client *client EINA_UNUSED, struct wl_re /* get the client for this resource */ if (!(ec = wl_resource_get_user_data(resource))) { - wl_resource_post_error(resource, - WL_DISPLAY_ERROR_INVALID_OBJECT, + wl_resource_post_error(resource, + WL_DISPLAY_ERROR_INVALID_OBJECT, "No Client For Shell Surface"); return; } @@ -398,7 +398,7 @@ _e_shell_surface_cb_title_set(struct wl_client *client EINA_UNUSED, struct wl_re if (ec->frame) e_comp_object_frame_title_set(ec->frame, title); } -static void +static void _e_shell_surface_cb_class_set(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, const char *clas) { E_Client *ec; @@ -406,8 +406,8 @@ _e_shell_surface_cb_class_set(struct wl_client *client EINA_UNUSED, struct wl_re /* get the client for this resource */ if (!(ec = wl_resource_get_user_data(resource))) { - wl_resource_post_error(resource, - WL_DISPLAY_ERROR_INVALID_OBJECT, + wl_resource_post_error(resource, + WL_DISPLAY_ERROR_INVALID_OBJECT, "No Client For Shell Surface"); return; } @@ -421,7 +421,7 @@ _e_shell_surface_cb_class_set(struct wl_client *client EINA_UNUSED, struct wl_re EC_CHANGED(ec); } -static const struct wl_shell_surface_interface _e_shell_surface_interface = +static const struct wl_shell_surface_interface _e_shell_surface_interface = { _e_shell_surface_cb_pong, _e_shell_surface_cb_move, @@ -435,13 +435,13 @@ static const struct wl_shell_surface_interface _e_shell_surface_interface = _e_shell_surface_cb_class_set, }; -static void +static void _e_shell_surface_configure_send(struct wl_resource *resource, uint32_t edges, int32_t width, int32_t height) { wl_shell_surface_send_configure(resource, edges, width, height); } -static void +static void _e_shell_surface_configure(struct wl_resource *resource, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) { E_Client *ec; @@ -452,16 +452,16 @@ _e_shell_surface_configure(struct wl_resource *resource, Evas_Coord x, Evas_Coor /* get the client for this resource */ if (!(ec = wl_resource_get_user_data(resource))) { - wl_resource_post_error(resource, - WL_DISPLAY_ERROR_INVALID_OBJECT, + wl_resource_post_error(resource, + WL_DISPLAY_ERROR_INVALID_OBJECT, "No Client For Shell Surface"); return; } if (ec->parent) { - if ((ec->netwm.type == E_WINDOW_TYPE_MENU) || - (ec->netwm.type == E_WINDOW_TYPE_POPUP_MENU) || + if ((ec->netwm.type == E_WINDOW_TYPE_MENU) || + (ec->netwm.type == E_WINDOW_TYPE_POPUP_MENU) || (ec->netwm.type == E_WINDOW_TYPE_DROPDOWN_MENU)) { x = E_CLAMP(ec->parent->client.x + ec->comp_data->popup.x, @@ -476,7 +476,7 @@ _e_shell_surface_configure(struct wl_resource *resource, Evas_Coord x, Evas_Coor e_client_util_move_resize_without_frame(ec, x, y, w, h); } -static void +static void _e_shell_surface_ping(struct wl_resource *resource) { E_Client *ec; @@ -485,8 +485,8 @@ _e_shell_surface_ping(struct wl_resource *resource) /* get the client for this resource */ if (!(ec = wl_resource_get_user_data(resource))) { - wl_resource_post_error(resource, - WL_DISPLAY_ERROR_INVALID_OBJECT, + wl_resource_post_error(resource, + WL_DISPLAY_ERROR_INVALID_OBJECT, "No Client For Shell Surface"); return; } @@ -495,7 +495,7 @@ _e_shell_surface_ping(struct wl_resource *resource) wl_shell_surface_send_ping(ec->comp_data->shell.surface, serial); } -static void +static void _e_shell_surface_map(struct wl_resource *resource) { E_Client *ec; @@ -503,8 +503,8 @@ _e_shell_surface_map(struct wl_resource *resource) /* get the client for this resource */ if (!(ec = wl_resource_get_user_data(resource))) { - wl_resource_post_error(resource, - WL_DISPLAY_ERROR_INVALID_OBJECT, + wl_resource_post_error(resource, + WL_DISPLAY_ERROR_INVALID_OBJECT, "No Client For Shell Surface"); return; } @@ -519,7 +519,7 @@ _e_shell_surface_map(struct wl_resource *resource) } } -static void +static void _e_shell_surface_unmap(struct wl_resource *resource) { E_Client *ec; @@ -527,8 +527,8 @@ _e_shell_surface_unmap(struct wl_resource *resource) /* get the client for this resource */ if (!(ec = wl_resource_get_user_data(resource))) { - wl_resource_post_error(resource, - WL_DISPLAY_ERROR_INVALID_OBJECT, + wl_resource_post_error(resource, + WL_DISPLAY_ERROR_INVALID_OBJECT, "No Client For Shell Surface"); return; } @@ -541,7 +541,7 @@ _e_shell_surface_unmap(struct wl_resource *resource) } } -static void +static void _e_shell_cb_shell_surface_get(struct wl_client *client, struct wl_resource *resource EINA_UNUSED, uint32_t id, struct wl_resource *surface_resource) { E_Pixmap *ep; @@ -551,8 +551,8 @@ _e_shell_cb_shell_surface_get(struct wl_client *client, struct wl_resource *reso /* get the pixmap from this surface so we can find the client */ if (!(ep = wl_resource_get_user_data(surface_resource))) { - wl_resource_post_error(surface_resource, - WL_DISPLAY_ERROR_INVALID_OBJECT, + wl_resource_post_error(surface_resource, + WL_DISPLAY_ERROR_INVALID_OBJECT, "No Pixmap Set On Surface"); return; } @@ -569,8 +569,8 @@ _e_shell_cb_shell_surface_get(struct wl_client *client, struct wl_resource *reso /* no client found. not internal window. maybe external client app ? */ if (!(ec = e_client_new(NULL, ep, 0, 0))) { - wl_resource_post_error(surface_resource, - WL_DISPLAY_ERROR_INVALID_OBJECT, + wl_resource_post_error(surface_resource, + WL_DISPLAY_ERROR_INVALID_OBJECT, "No Client For Pixmap"); return; } @@ -581,8 +581,8 @@ _e_shell_cb_shell_surface_get(struct wl_client *client, struct wl_resource *reso /* get the client data */ if (!(cdata = ec->comp_data)) { - wl_resource_post_error(surface_resource, - WL_DISPLAY_ERROR_INVALID_OBJECT, + wl_resource_post_error(surface_resource, + WL_DISPLAY_ERROR_INVALID_OBJECT, "No Data For Client"); return; } @@ -590,22 +590,22 @@ _e_shell_cb_shell_surface_get(struct wl_client *client, struct wl_resource *reso /* check for existing shell surface */ if (cdata->shell.surface) { - wl_resource_post_error(surface_resource, - WL_DISPLAY_ERROR_INVALID_OBJECT, + wl_resource_post_error(surface_resource, + WL_DISPLAY_ERROR_INVALID_OBJECT, "Client already has shell surface"); return; } /* try to create a shell surface */ - if (!(cdata->shell.surface = + if (!(cdata->shell.surface = wl_resource_create(client, &wl_shell_surface_interface, 1, id))) { wl_resource_post_no_memory(surface_resource); return; } - wl_resource_set_implementation(cdata->shell.surface, - &_e_shell_surface_interface, + wl_resource_set_implementation(cdata->shell.surface, + &_e_shell_surface_interface, ec, _e_shell_surface_cb_destroy); cdata->surface = surface_resource; @@ -616,7 +616,7 @@ _e_shell_cb_shell_surface_get(struct wl_client *client, struct wl_resource *reso cdata->shell.unmap = _e_shell_surface_unmap; } -static void +static void _e_xdg_surface_state_add(struct wl_resource *resource, struct wl_array *states, uint32_t state) { uint32_t *s; @@ -629,21 +629,21 @@ _e_xdg_surface_state_add(struct wl_resource *resource, struct wl_array *states, return; } -static void +static void _e_xdg_shell_surface_configure_send(struct wl_resource *resource, uint32_t edges, int32_t width, int32_t height) { E_Client *ec; struct wl_array states; uint32_t serial; - DBG("XDG_SHELL: Surface Configure Send: %d \t%d %d\tEdges: %d", + DBG("XDG_SHELL: Surface Configure Send: %d \t%d %d\tEdges: %d", wl_resource_get_id(resource), width, height, edges); /* get the client for this resource */ if (!(ec = wl_resource_get_user_data(resource))) { - wl_resource_post_error(resource, - WL_DISPLAY_ERROR_INVALID_OBJECT, + wl_resource_post_error(resource, + WL_DISPLAY_ERROR_INVALID_OBJECT, "No Client For Shell Surface"); return; } @@ -666,13 +666,13 @@ _e_xdg_shell_surface_configure_send(struct wl_resource *resource, uint32_t edges wl_array_release(&states); } -static void +static void _e_xdg_shell_surface_cb_destroy(struct wl_client *client EINA_UNUSED, struct wl_resource *resource) { _e_shell_surface_destroy(resource); } -static void +static void _e_xdg_shell_surface_cb_parent_set(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, struct wl_resource *parent_resource) { E_Client *ec; @@ -688,7 +688,7 @@ _e_xdg_shell_surface_cb_parent_set(struct wl_client *client EINA_UNUSED, struct _e_shell_surface_parent_set(ec, parent_resource); } -static void +static void _e_xdg_shell_surface_cb_title_set(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, const char *title) { E_Client *ec; @@ -696,8 +696,8 @@ _e_xdg_shell_surface_cb_title_set(struct wl_client *client EINA_UNUSED, struct w /* get the client for this resource */ if (!(ec = wl_resource_get_user_data(resource))) { - wl_resource_post_error(resource, - WL_DISPLAY_ERROR_INVALID_OBJECT, + wl_resource_post_error(resource, + WL_DISPLAY_ERROR_INVALID_OBJECT, "No Client For Shell Surface"); return; } @@ -707,7 +707,7 @@ _e_xdg_shell_surface_cb_title_set(struct wl_client *client EINA_UNUSED, struct w if (ec->frame) e_comp_object_frame_title_set(ec->frame, title); } -static void +static void _e_xdg_shell_surface_cb_app_id_set(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, const char *id) { E_Client *ec; @@ -715,8 +715,8 @@ _e_xdg_shell_surface_cb_app_id_set(struct wl_client *client EINA_UNUSED, struct /* get the client for this resource */ if (!(ec = wl_resource_get_user_data(resource))) { - wl_resource_post_error(resource, - WL_DISPLAY_ERROR_INVALID_OBJECT, + wl_resource_post_error(resource, + WL_DISPLAY_ERROR_INVALID_OBJECT, "No Client For Shell Surface"); return; } @@ -731,7 +731,7 @@ _e_xdg_shell_surface_cb_app_id_set(struct wl_client *client EINA_UNUSED, struct EC_CHANGED(ec); } -static void +static void _e_xdg_shell_surface_cb_window_menu_show(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, struct wl_resource *seat_resource EINA_UNUSED, uint32_t serial EINA_UNUSED, int32_t x, int32_t y) { E_Client *ec; @@ -750,7 +750,7 @@ _e_xdg_shell_surface_cb_window_menu_show(struct wl_client *client EINA_UNUSED, s e_int_client_menu_show(ec, x, y, 0, timestamp); } -static void +static void _e_xdg_shell_surface_cb_move(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, struct wl_resource *seat_resource, uint32_t serial EINA_UNUSED) { E_Client *ec; @@ -760,8 +760,8 @@ _e_xdg_shell_surface_cb_move(struct wl_client *client EINA_UNUSED, struct wl_res /* get the client for this resource */ if (!(ec = wl_resource_get_user_data(resource))) { - wl_resource_post_error(resource, - WL_DISPLAY_ERROR_INVALID_OBJECT, + wl_resource_post_error(resource, + WL_DISPLAY_ERROR_INVALID_OBJECT, "No Client For Shell Surface"); return; } @@ -771,8 +771,8 @@ _e_xdg_shell_surface_cb_move(struct wl_client *client EINA_UNUSED, struct wl_res /* get compositor data from seat */ if (!(cdata = wl_resource_get_user_data(seat_resource))) { - wl_resource_post_error(seat_resource, - WL_DISPLAY_ERROR_INVALID_OBJECT, + wl_resource_post_error(seat_resource, + WL_DISPLAY_ERROR_INVALID_OBJECT, "No Comp_Data for Seat"); return; } @@ -793,15 +793,15 @@ _e_xdg_shell_surface_cb_move(struct wl_client *client EINA_UNUSED, struct wl_res break; } - e_comp_object_frame_xy_unadjust(ec->frame, - wl_fixed_to_int(cdata->ptr.x) + ec->client.x, - wl_fixed_to_int(cdata->ptr.y) + ec->client.y, + e_comp_object_frame_xy_unadjust(ec->frame, + wl_fixed_to_int(cdata->ptr.x) + ec->client.x, + wl_fixed_to_int(cdata->ptr.y) + ec->client.y, &ev.canvas.x, &ev.canvas.y); _e_shell_surface_mouse_down_helper(ec, &ev, EINA_TRUE); } -static void +static void _e_xdg_shell_surface_cb_resize(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, struct wl_resource *seat_resource, uint32_t serial EINA_UNUSED, uint32_t edges) { E_Client *ec; @@ -814,13 +814,13 @@ _e_xdg_shell_surface_cb_resize(struct wl_client *client EINA_UNUSED, struct wl_r /* get the client for this resource */ if (!(ec = wl_resource_get_user_data(resource))) { - wl_resource_post_error(resource, - WL_DISPLAY_ERROR_INVALID_OBJECT, + wl_resource_post_error(resource, + WL_DISPLAY_ERROR_INVALID_OBJECT, "No Client For Shell Surface"); return; } - if ((edges == 0) || (edges > 15) || + if ((edges == 0) || (edges > 15) || ((edges & 3) == 3) || ((edges & 12) == 12)) return; if ((ec->maximized) || (ec->fullscreen)) return; @@ -828,8 +828,8 @@ _e_xdg_shell_surface_cb_resize(struct wl_client *client EINA_UNUSED, struct wl_r /* get compositor data from seat */ if (!(cdata = wl_resource_get_user_data(seat_resource))) { - wl_resource_post_error(seat_resource, - WL_DISPLAY_ERROR_INVALID_OBJECT, + wl_resource_post_error(seat_resource, + WL_DISPLAY_ERROR_INVALID_OBJECT, "No Comp_Data for Seat"); return; } @@ -855,21 +855,21 @@ _e_xdg_shell_surface_cb_resize(struct wl_client *client EINA_UNUSED, struct wl_r break; } - e_comp_object_frame_xy_unadjust(ec->frame, - wl_fixed_to_int(cdata->ptr.x) + ec->client.x, - wl_fixed_to_int(cdata->ptr.y) + ec->client.y, + e_comp_object_frame_xy_unadjust(ec->frame, + wl_fixed_to_int(cdata->ptr.x) + ec->client.x, + wl_fixed_to_int(cdata->ptr.y) + ec->client.y, &ev.canvas.x, &ev.canvas.y); _e_shell_surface_mouse_down_helper(ec, &ev, EINA_FALSE); } -static void +static void _e_xdg_shell_surface_cb_ack_configure(struct wl_client *client EINA_UNUSED, struct wl_resource *resource EINA_UNUSED, uint32_t serial EINA_UNUSED) { /* No-Op */ } -static void +static void _e_xdg_shell_surface_cb_window_geometry_set(struct wl_client *client EINA_UNUSED, struct wl_resource *resource EINA_UNUSED, int32_t x EINA_UNUSED, int32_t y EINA_UNUSED, int32_t w EINA_UNUSED, int32_t h EINA_UNUSED) { /* E_Client *ec; */ @@ -887,7 +887,7 @@ _e_xdg_shell_surface_cb_window_geometry_set(struct wl_client *client EINA_UNUSED /* wl_resource_get_id(resource), x, y, w, h); */ } -static void +static void _e_xdg_shell_surface_cb_maximized_set(struct wl_client *client EINA_UNUSED, struct wl_resource *resource) { E_Client *ec; @@ -895,21 +895,21 @@ _e_xdg_shell_surface_cb_maximized_set(struct wl_client *client EINA_UNUSED, stru /* get the client for this resource */ if (!(ec = wl_resource_get_user_data(resource))) { - wl_resource_post_error(resource, - WL_DISPLAY_ERROR_INVALID_OBJECT, + wl_resource_post_error(resource, + WL_DISPLAY_ERROR_INVALID_OBJECT, "No Client For Shell Surface"); return; } - if (!ec->lock_user_maximize) + if (!ec->lock_user_maximize) { - e_client_maximize(ec, ((e_config->maximize_policy & E_MAXIMIZE_TYPE) | + e_client_maximize(ec, ((e_config->maximize_policy & E_MAXIMIZE_TYPE) | E_MAXIMIZE_BOTH)); _e_xdg_shell_surface_configure_send(resource, 0, ec->w, ec->h); } } -static void +static void _e_xdg_shell_surface_cb_maximized_unset(struct wl_client *client EINA_UNUSED, struct wl_resource *resource) { E_Client *ec; @@ -917,8 +917,8 @@ _e_xdg_shell_surface_cb_maximized_unset(struct wl_client *client EINA_UNUSED, st /* get the client for this resource */ if (!(ec = wl_resource_get_user_data(resource))) { - wl_resource_post_error(resource, - WL_DISPLAY_ERROR_INVALID_OBJECT, + wl_resource_post_error(resource, + WL_DISPLAY_ERROR_INVALID_OBJECT, "No Client For Shell Surface"); return; } @@ -927,7 +927,7 @@ _e_xdg_shell_surface_cb_maximized_unset(struct wl_client *client EINA_UNUSED, st _e_xdg_shell_surface_configure_send(resource, 0, ec->w, ec->h); } -static void +static void _e_xdg_shell_surface_cb_fullscreen_set(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, struct wl_resource *output_resource EINA_UNUSED) { E_Client *ec; @@ -935,8 +935,8 @@ _e_xdg_shell_surface_cb_fullscreen_set(struct wl_client *client EINA_UNUSED, str /* get the client for this resource */ if (!(ec = wl_resource_get_user_data(resource))) { - wl_resource_post_error(resource, - WL_DISPLAY_ERROR_INVALID_OBJECT, + wl_resource_post_error(resource, + WL_DISPLAY_ERROR_INVALID_OBJECT, "No Client For Shell Surface"); return; } @@ -945,7 +945,7 @@ _e_xdg_shell_surface_cb_fullscreen_set(struct wl_client *client EINA_UNUSED, str e_client_fullscreen(ec, e_config->fullscreen_policy); } -static void +static void _e_xdg_shell_surface_cb_fullscreen_unset(struct wl_client *client EINA_UNUSED, struct wl_resource *resource) { E_Client *ec; @@ -953,8 +953,8 @@ _e_xdg_shell_surface_cb_fullscreen_unset(struct wl_client *client EINA_UNUSED, s /* get the client for this resource */ if (!(ec = wl_resource_get_user_data(resource))) { - wl_resource_post_error(resource, - WL_DISPLAY_ERROR_INVALID_OBJECT, + wl_resource_post_error(resource, + WL_DISPLAY_ERROR_INVALID_OBJECT, "No Client For Shell Surface"); return; } @@ -963,7 +963,7 @@ _e_xdg_shell_surface_cb_fullscreen_unset(struct wl_client *client EINA_UNUSED, s e_client_unfullscreen(ec); } -static void +static void _e_xdg_shell_surface_cb_minimized_set(struct wl_client *client EINA_UNUSED, struct wl_resource *resource) { E_Client *ec; @@ -971,8 +971,8 @@ _e_xdg_shell_surface_cb_minimized_set(struct wl_client *client EINA_UNUSED, stru /* get the client for this resource */ if (!(ec = wl_resource_get_user_data(resource))) { - wl_resource_post_error(resource, - WL_DISPLAY_ERROR_INVALID_OBJECT, + wl_resource_post_error(resource, + WL_DISPLAY_ERROR_INVALID_OBJECT, "No Client For Shell Surface"); return; } @@ -981,7 +981,7 @@ _e_xdg_shell_surface_cb_minimized_set(struct wl_client *client EINA_UNUSED, stru e_client_iconify(ec); } -static const struct xdg_surface_interface _e_xdg_surface_interface = +static const struct xdg_surface_interface _e_xdg_surface_interface = { _e_xdg_shell_surface_cb_destroy, _e_xdg_shell_surface_cb_parent_set, @@ -999,14 +999,14 @@ static const struct xdg_surface_interface _e_xdg_surface_interface = _e_xdg_shell_surface_cb_minimized_set, }; -static void +static void _e_xdg_shell_cb_unstable_version(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, int32_t version) { if (version > 1) wl_resource_post_error(resource, 1, "XDG Version Not Implemented Yet"); } -static void +static void _e_xdg_shell_surface_configure(struct wl_resource *resource, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) { E_Client *ec; @@ -1018,16 +1018,16 @@ _e_xdg_shell_surface_configure(struct wl_resource *resource, Evas_Coord x, Evas_ /* get the client for this resource */ if (!(ec = wl_resource_get_user_data(resource))) { - wl_resource_post_error(resource, - WL_DISPLAY_ERROR_INVALID_OBJECT, + wl_resource_post_error(resource, + WL_DISPLAY_ERROR_INVALID_OBJECT, "No Client For Shell Surface"); return; } if (ec->parent) { - if ((ec->netwm.type == E_WINDOW_TYPE_MENU) || - (ec->netwm.type == E_WINDOW_TYPE_POPUP_MENU) || + if ((ec->netwm.type == E_WINDOW_TYPE_MENU) || + (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; @@ -1043,7 +1043,7 @@ _e_xdg_shell_surface_configure(struct wl_resource *resource, Evas_Coord x, Evas_ /* TODO: ack configure ?? */ } -static void +static void _e_xdg_shell_surface_ping(struct wl_resource *resource) { E_Client *ec; @@ -1052,8 +1052,8 @@ _e_xdg_shell_surface_ping(struct wl_resource *resource) /* get the client for this resource */ if (!(ec = wl_resource_get_user_data(resource))) { - wl_resource_post_error(resource, - WL_DISPLAY_ERROR_INVALID_OBJECT, + wl_resource_post_error(resource, + WL_DISPLAY_ERROR_INVALID_OBJECT, "No Client For Shell Surface"); return; } @@ -1063,7 +1063,7 @@ _e_xdg_shell_surface_ping(struct wl_resource *resource) xdg_shell_send_ping(ec->comp->wl_comp_data->shell_interface.xdg_shell, serial); } -static void +static void _e_xdg_shell_surface_map(struct wl_resource *resource) { E_Client *ec; @@ -1073,8 +1073,8 @@ _e_xdg_shell_surface_map(struct wl_resource *resource) /* get the client for this resource */ if (!(ec = wl_resource_get_user_data(resource))) { - wl_resource_post_error(resource, - WL_DISPLAY_ERROR_INVALID_OBJECT, + wl_resource_post_error(resource, + WL_DISPLAY_ERROR_INVALID_OBJECT, "No Client For Shell Surface"); return; } @@ -1086,14 +1086,14 @@ _e_xdg_shell_surface_map(struct wl_resource *resource) evas_object_show(ec->frame); ec->comp_data->mapped = EINA_TRUE; - /* FIXME: sometimes popup surfaces Do Not raise above their + /* FIXME: sometimes popup surfaces Do Not raise above their * respective parents... */ /* if (ec->netwm.type == E_WINDOW_TYPE_POPUP_MENU) */ /* e_client_raise_latest_set(ec); */ } } -static void +static void _e_xdg_shell_surface_unmap(struct wl_resource *resource) { E_Client *ec; @@ -1103,8 +1103,8 @@ _e_xdg_shell_surface_unmap(struct wl_resource *resource) /* get the client for this resource */ if (!(ec = wl_resource_get_user_data(resource))) { - wl_resource_post_error(resource, - WL_DISPLAY_ERROR_INVALID_OBJECT, + wl_resource_post_error(resource, + WL_DISPLAY_ERROR_INVALID_OBJECT, "No Client For Shell Surface"); return; } @@ -1117,7 +1117,7 @@ _e_xdg_shell_surface_unmap(struct wl_resource *resource) } } -static void +static void _e_xdg_shell_cb_surface_get(struct wl_client *client, struct wl_resource *resource EINA_UNUSED, uint32_t id, struct wl_resource *surface_resource) { E_Pixmap *ep; @@ -1129,8 +1129,8 @@ _e_xdg_shell_cb_surface_get(struct wl_client *client, struct wl_resource *resour /* get the pixmap from this surface so we can find the client */ if (!(ep = wl_resource_get_user_data(surface_resource))) { - wl_resource_post_error(surface_resource, - WL_DISPLAY_ERROR_INVALID_OBJECT, + wl_resource_post_error(surface_resource, + WL_DISPLAY_ERROR_INVALID_OBJECT, "No Pixmap Set On Surface"); return; } @@ -1147,8 +1147,8 @@ _e_xdg_shell_cb_surface_get(struct wl_client *client, struct wl_resource *resour /* no client found. not internal window. maybe external client app ? */ if (!(ec = e_client_new(NULL, ep, 0, 0))) { - wl_resource_post_error(surface_resource, - WL_DISPLAY_ERROR_INVALID_OBJECT, + wl_resource_post_error(surface_resource, + WL_DISPLAY_ERROR_INVALID_OBJECT, "No Client For Pixmap"); return; } @@ -1159,8 +1159,8 @@ _e_xdg_shell_cb_surface_get(struct wl_client *client, struct wl_resource *resour /* get the client data */ if (!(cdata = ec->comp_data)) { - wl_resource_post_error(surface_resource, - WL_DISPLAY_ERROR_INVALID_OBJECT, + wl_resource_post_error(surface_resource, + WL_DISPLAY_ERROR_INVALID_OBJECT, "No Data For Client"); return; } @@ -1168,14 +1168,14 @@ _e_xdg_shell_cb_surface_get(struct wl_client *client, struct wl_resource *resour /* check for existing shell surface */ if (cdata->shell.surface) { - wl_resource_post_error(surface_resource, - WL_DISPLAY_ERROR_INVALID_OBJECT, + wl_resource_post_error(surface_resource, + WL_DISPLAY_ERROR_INVALID_OBJECT, "Client already has XDG shell surface"); return; } /* try to create a shell surface */ - if (!(cdata->shell.surface = + if (!(cdata->shell.surface = wl_resource_create(client, &xdg_surface_interface, 1, id))) { ERR("Could not create xdg shell surface"); @@ -1183,8 +1183,8 @@ _e_xdg_shell_cb_surface_get(struct wl_client *client, struct wl_resource *resour return; } - wl_resource_set_implementation(cdata->shell.surface, - &_e_xdg_surface_interface, ec, + wl_resource_set_implementation(cdata->shell.surface, + &_e_xdg_surface_interface, ec, _e_shell_surface_cb_destroy); cdata->surface = surface_resource; @@ -1203,18 +1203,18 @@ _e_xdg_shell_cb_surface_get(struct wl_client *client, struct wl_resource *resour ec->comp_data->set_win_type = EINA_TRUE; } -static void +static void _e_xdg_shell_popup_cb_destroy(struct wl_client *client EINA_UNUSED, struct wl_resource *resource) { _e_shell_surface_destroy(resource); } -static const struct xdg_popup_interface _e_xdg_popup_interface = +static const struct xdg_popup_interface _e_xdg_popup_interface = { _e_xdg_shell_popup_cb_destroy, }; -static void +static void _e_xdg_shell_cb_popup_get(struct wl_client *client, struct wl_resource *resource EINA_UNUSED, uint32_t id, struct wl_resource *surface_resource, struct wl_resource *parent_resource, struct wl_resource *seat_resource EINA_UNUSED, uint32_t serial EINA_UNUSED, int32_t x, int32_t y, uint32_t flags EINA_UNUSED) { E_Pixmap *ep; @@ -1229,8 +1229,8 @@ _e_xdg_shell_cb_popup_get(struct wl_client *client, struct wl_resource *resource /* get the pixmap from this surface so we can find the client */ if (!(ep = wl_resource_get_user_data(surface_resource))) { - wl_resource_post_error(surface_resource, - WL_DISPLAY_ERROR_INVALID_OBJECT, + wl_resource_post_error(surface_resource, + WL_DISPLAY_ERROR_INVALID_OBJECT, "No Pixmap Set On Surface"); return; } @@ -1247,8 +1247,8 @@ _e_xdg_shell_cb_popup_get(struct wl_client *client, struct wl_resource *resource /* no client found. create one */ if (!(ec = e_client_new(NULL, ep, 0, 1))) { - wl_resource_post_error(surface_resource, - WL_DISPLAY_ERROR_INVALID_OBJECT, + wl_resource_post_error(surface_resource, + WL_DISPLAY_ERROR_INVALID_OBJECT, "No Client For Pixmap"); return; } @@ -1259,8 +1259,8 @@ _e_xdg_shell_cb_popup_get(struct wl_client *client, struct wl_resource *resource /* get the client data */ if (!(cdata = ec->comp_data)) { - wl_resource_post_error(surface_resource, - WL_DISPLAY_ERROR_INVALID_OBJECT, + wl_resource_post_error(surface_resource, + WL_DISPLAY_ERROR_INVALID_OBJECT, "No Data For Client"); return; } @@ -1268,8 +1268,8 @@ _e_xdg_shell_cb_popup_get(struct wl_client *client, struct wl_resource *resource /* check for existing shell surface */ if (cdata->shell.surface) { - wl_resource_post_error(surface_resource, - WL_DISPLAY_ERROR_INVALID_OBJECT, + wl_resource_post_error(surface_resource, + WL_DISPLAY_ERROR_INVALID_OBJECT, "Client already has shell popup surface"); return; } @@ -1279,12 +1279,12 @@ _e_xdg_shell_cb_popup_get(struct wl_client *client, struct wl_resource *resource { wl_resource_post_error(surface_resource, WL_DISPLAY_ERROR_INVALID_OBJECT, - "Popup requires a parent shell surface"); + "Popup requires a parent shell surface"); return; } /* try to create a shell surface */ - if (!(cdata->shell.surface = + if (!(cdata->shell.surface = wl_resource_create(client, &xdg_popup_interface, 1, id))) { ERR("Could not create xdg shell surface"); @@ -1292,7 +1292,7 @@ _e_xdg_shell_cb_popup_get(struct wl_client *client, struct wl_resource *resource return; } - wl_resource_set_implementation(cdata->shell.surface, + wl_resource_set_implementation(cdata->shell.surface, &_e_xdg_popup_interface, ec, NULL); cdata->surface = surface_resource; @@ -1328,7 +1328,7 @@ _e_xdg_shell_cb_popup_get(struct wl_client *client, struct wl_resource *resource } -static void +static void _e_xdg_shell_cb_pong(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, uint32_t serial EINA_UNUSED) { E_Client *ec; @@ -1340,12 +1340,12 @@ _e_xdg_shell_cb_pong(struct wl_client *client EINA_UNUSED, struct wl_resource *r } } -static const struct wl_shell_interface _e_shell_interface = +static const struct wl_shell_interface _e_shell_interface = { _e_shell_cb_shell_surface_get }; -static const struct xdg_shell_interface _e_xdg_shell_interface = +static const struct xdg_shell_interface _e_xdg_shell_interface = { _e_xdg_shell_cb_unstable_version, _e_xdg_shell_cb_surface_get, @@ -1353,7 +1353,7 @@ static const struct xdg_shell_interface _e_xdg_shell_interface = _e_xdg_shell_cb_pong }; -static void +static void _e_xdg_shell_cb_unbind(struct wl_resource *resource) { E_Comp_Data *cdata; @@ -1363,7 +1363,7 @@ _e_xdg_shell_cb_unbind(struct wl_resource *resource) cdata->shell_interface.xdg_shell = NULL; } -static int +static int _e_xdg_shell_cb_dispatch(const void *implementation EINA_UNUSED, void *target, uint32_t opcode, const struct wl_message *message EINA_UNUSED, union wl_argument *args) { E_Comp_Data *cdata; @@ -1374,27 +1374,27 @@ _e_xdg_shell_cb_dispatch(const void *implementation EINA_UNUSED, void *target, u if (opcode != 0) { - wl_resource_post_error(res, WL_DISPLAY_ERROR_INVALID_OBJECT, + wl_resource_post_error(res, WL_DISPLAY_ERROR_INVALID_OBJECT, "Must call use_unstable_version first"); return 0; } if (args[0].i != XDG_SERVER_VERSION) { - wl_resource_post_error(res, WL_DISPLAY_ERROR_INVALID_OBJECT, + wl_resource_post_error(res, WL_DISPLAY_ERROR_INVALID_OBJECT, "Incompatible versions. " - "Server: %d, Client: %d", + "Server: %d, Client: %d", XDG_SERVER_VERSION, args[0].i); return 0; } - wl_resource_set_implementation(res, &_e_xdg_shell_interface, cdata, + wl_resource_set_implementation(res, &_e_xdg_shell_interface, cdata, _e_xdg_shell_cb_unbind); return 1; } -static void +static void _e_shell_cb_unbind(struct wl_resource *resource) { E_Comp_Data *cdata; @@ -1404,7 +1404,7 @@ _e_shell_cb_unbind(struct wl_resource *resource) cdata->shell_interface.shell = NULL; } -static void +static void _e_shell_cb_bind(struct wl_client *client, void *data, uint32_t version, uint32_t id) { E_Comp_Data *cdata; @@ -1423,11 +1423,11 @@ _e_shell_cb_bind(struct wl_client *client, void *data, uint32_t version, uint32_ } cdata->shell_interface.shell = res; - wl_resource_set_implementation(res, &_e_shell_interface, cdata, + wl_resource_set_implementation(res, &_e_shell_interface, cdata, _e_shell_cb_unbind); } -static void +static void _e_xdg_shell_cb_bind(struct wl_client *client, void *data, uint32_t version, uint32_t id) { E_Comp_Data *cdata; @@ -1467,7 +1467,7 @@ e_modapi_init(E_Module *m) if (!(cdata = comp->wl_comp_data)) return NULL; /* try to create global shell interface */ - if (!wl_global_create(cdata->wl.disp, &wl_shell_interface, 1, + if (!wl_global_create(cdata->wl.disp, &wl_shell_interface, 1, cdata, _e_shell_cb_bind)) { ERR("Could not create shell global: %m"); @@ -1475,7 +1475,7 @@ e_modapi_init(E_Module *m) } /* try to create global xdg_shell interface */ - if (!wl_global_create(cdata->wl.disp, &xdg_shell_interface, 1, + if (!wl_global_create(cdata->wl.disp, &xdg_shell_interface, 1, cdata, _e_xdg_shell_cb_bind)) { ERR("Could not create xdg_shell global: %m"); @@ -1485,7 +1485,7 @@ e_modapi_init(E_Module *m) return m; } -EAPI int +EAPI int e_modapi_shutdown(E_Module *m EINA_UNUSED) { return 1; |