trivial wl shell module cleanups

remove some old comments, don't pass global data as function param
This commit is contained in:
Mike Blumenkrantz 2016-04-18 15:30:03 -04:00
parent b5ef01ddac
commit 84ee6c0300
1 changed files with 4 additions and 15 deletions

View File

@ -1006,7 +1006,6 @@ _e_xdg_shell_surface_configure(struct wl_resource *resource, Evas_Coord x, Evas_
} }
e_client_util_move_resize_without_frame(ec, x, y, w, h); e_client_util_move_resize_without_frame(ec, x, y, w, h);
/* TODO: ack configure ?? */
} }
static void static void
@ -1344,8 +1343,7 @@ _e_shell_cb_bind(struct wl_client *client, void *data EINA_UNUSED, uint32_t vers
e_comp_wl->shell_interface.shell = res; e_comp_wl->shell_interface.shell = res;
wl_resource_set_implementation(res, &_e_shell_interface, wl_resource_set_implementation(res, &_e_shell_interface,
e_comp->wl_comp_data, NULL, _e_shell_cb_unbind);
_e_shell_cb_unbind);
} }
static void static void
@ -1361,7 +1359,7 @@ _e_xdg_shell_cb_bind(struct wl_client *client, void *data EINA_UNUSED, uint32_t
e_comp_wl->shell_interface.xdg_shell = res; e_comp_wl->shell_interface.xdg_shell = res;
wl_resource_set_dispatcher(res, _e_xdg_shell_cb_dispatch, NULL, wl_resource_set_dispatcher(res, _e_xdg_shell_cb_dispatch, NULL,
e_comp->wl_comp_data, NULL); NULL, NULL);
} }
E_API E_Module_Api e_modapi = { E_MODULE_API_VERSION, "Wl_Desktop_Shell" }; E_API E_Module_Api e_modapi = { E_MODULE_API_VERSION, "Wl_Desktop_Shell" };
@ -1369,18 +1367,9 @@ E_API E_Module_Api e_modapi = { E_MODULE_API_VERSION, "Wl_Desktop_Shell" };
E_API void * E_API void *
e_modapi_init(E_Module *m) e_modapi_init(E_Module *m)
{ {
/* try to get the current compositor */
if (!e_comp) return NULL;
/* make sure it's a wayland compositor */
/* if (e_comp->comp_type != E_PIXMAP_TYPE_WL) return NULL; */
/* try to get the compositor data */
if (!e_comp->wl_comp_data) return NULL;
/* try to create global shell interface */ /* try to create global shell interface */
if (!wl_global_create(e_comp_wl->wl.disp, &wl_shell_interface, 1, if (!wl_global_create(e_comp_wl->wl.disp, &wl_shell_interface, 1,
e_comp->wl_comp_data, _e_shell_cb_bind)) NULL, _e_shell_cb_bind))
{ {
ERR("Could not create shell global: %m"); ERR("Could not create shell global: %m");
return NULL; return NULL;
@ -1388,7 +1377,7 @@ e_modapi_init(E_Module *m)
/* try to create global xdg_shell interface */ /* try to create global xdg_shell interface */
if (!wl_global_create(e_comp_wl->wl.disp, &xdg_shell_interface, 1, if (!wl_global_create(e_comp_wl->wl.disp, &xdg_shell_interface, 1,
e_comp->wl_comp_data, _e_xdg_shell_cb_bind)) NULL, _e_xdg_shell_cb_bind))
{ {
ERR("Could not create xdg_shell global: %m"); ERR("Could not create xdg_shell global: %m");
return NULL; return NULL;