diff --git a/src/bin/Makefile.mk b/src/bin/Makefile.mk index 9083b73f5..b6905834f 100644 --- a/src/bin/Makefile.mk +++ b/src/bin/Makefile.mk @@ -385,7 +385,7 @@ src/bin/e_comp_wl_input.c \ src/bin/e_comp_wl.c endif -src_bin_enlightenment_CPPFLAGS = $(E_CPPFLAGS) -DEFL_BETA_API_SUPPORT -DEFL_EO_API_SUPPORT -DE_LOGGING=1 @WAYLAND_CFLAGS@ @WAYLAND_EGL_CFLAGS@ @ECORE_X_CFLAGS@ -DNEED_X=1 +src_bin_enlightenment_CPPFLAGS = $(E_CPPFLAGS) -DEFL_BETA_API_SUPPORT -DEFL_EO_API_SUPPORT -DE_LOGGING=1 @WAYLAND_CFLAGS@ @WAYLAND_EGL_CFLAGS@ @ECORE_X_CFLAGS@ -DNEED_X=1 -DNEED_WL src_bin_enlightenment_SOURCES = \ src/bin/e_main.c \ $(enlightenment_src) diff --git a/src/bin/e_client.h b/src/bin/e_client.h index 0084b596a..831b9c5fa 100644 --- a/src/bin/e_client.h +++ b/src/bin/e_client.h @@ -257,8 +257,7 @@ struct E_Client E_Direction shade_dir; - E_Comp_Wl_Client_Data *wl_comp_data; - E_Comp_X_Client_Data *x_comp_data; //private for the compositor engine (X, Wayland) ONLY + E_Comp_Client_Data *comp_data; Evas_Object *input_object; //for running wayland clients in X diff --git a/src/bin/e_comp.c b/src/bin/e_comp.c index b7b55a2fa..3772163f0 100644 --- a/src/bin/e_comp.c +++ b/src/bin/e_comp.c @@ -1,4 +1,7 @@ #include "e.h" +#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY) +# include "e_comp_wl.h" +#endif #define OVER_FLOW 1 //#define SHAPE_DEBUG diff --git a/src/bin/e_comp.h b/src/bin/e_comp.h index 5b0ca4d94..c023e9207 100644 --- a/src/bin/e_comp.h +++ b/src/bin/e_comp.h @@ -1,15 +1,27 @@ #ifdef E_TYPEDEFS typedef struct _E_Comp E_Comp; -typedef struct _E_Comp_X_Data E_Comp_X_Data; -typedef struct _E_Comp_Wl_Data E_Comp_Wl_Data; -typedef struct _E_Comp_X_Client_Data E_Comp_X_Client_Data; -typedef struct _E_Comp_Wl_Client_Data E_Comp_Wl_Client_Data; + +#ifdef E_COMP_WL +typedef struct _E_Comp_Wl_Client_Data E_Comp_Client_Data; +typedef struct _E_Comp_Wl_Data E_Comp_Data; +#endif + +#ifdef E_COMP_X +typedef struct _E_Comp_X_Client_Data E_Comp_Client_Data; +typedef struct _E_Comp_X_Data E_Comp_Data; +#endif + +#if !defined(E_COMP_WL) && !defined(E_COMP_X) +typedef struct _E_Comp_Data E_Comp_Data; +typedef struct _E_Comp_Client_Data E_Comp_Client_Data; +#endif + typedef struct _E_Comp_Demo_Style_Item E_Comp_Demo_Style_Item; -#define E_COMP_TYPE (int) 0xE0b01003 +# define E_COMP_TYPE (int) 0xE0b01003 -#define E_LAYER_COUNT 19 -#define E_CLIENT_LAYER_COUNT 11 +# define E_LAYER_COUNT 19 +# define E_CLIENT_LAYER_COUNT 11 typedef enum _E_Layer { @@ -35,8 +47,8 @@ typedef enum _E_Layer } E_Layer; #else -#ifndef E_COMP_H -#define E_COMP_H +# ifndef E_COMP_H +# define E_COMP_H # include "e_comp_cfdata.h" @@ -58,8 +70,8 @@ struct _E_Comp Eina_List *clients; unsigned int new_clients; - E_Comp_X_Data *x_comp_data; - E_Comp_Wl_Data *wl_comp_data; + E_Comp_Data *x_comp_data; + E_Comp_Data *wl_comp_data; E_Pixmap_Type comp_type; //for determining X/Wayland/ diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 76493cc41..5c986a618 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -1,8 +1,6 @@ +#define E_COMP_WL #include "e.h" -#include "e_comp_wl.h" -#include "e_comp_wl_input.h" -#include "e_comp_wl_data.h" -#include "e_surface.h" + #define E_COMP_WL_PIXMAP_CHECK \ if (e_pixmap_type_get(ec->pixmap) != E_PIXMAP_TYPE_WL) return @@ -49,9 +47,9 @@ _e_comp_wl_client_event_free(void *d EINA_UNUSED, void *event) static void _e_comp_wl_buffer_pending_cb_destroy(struct wl_listener *listener, void *data EINA_UNUSED) { - E_Comp_Wl_Client_Data *cd; + E_Comp_Client_Data *cd; - if (!(cd = container_of(listener, E_Comp_Wl_Client_Data, + if (!(cd = container_of(listener, E_Comp_Client_Data, pending.buffer_destroy))) return; @@ -135,9 +133,9 @@ _e_comp_wl_surface_cb_destroy(struct wl_client *client EINA_UNUSED, struct wl_re static E_Comp_Wl_Subsurf * _e_comp_wl_client_subsurf_data_get(E_Client *ec) { - if (!ec->wl_comp_data) return NULL; + if (!ec->comp_data) return NULL; - return ec->wl_comp_data->sub.cdata; + return ec->comp_data->sub.cdata; } static E_Client * @@ -145,7 +143,7 @@ _e_comp_wl_subsurface_parent_get(E_Client *ec) { E_Comp_Wl_Subsurf *sub_cdata; - if (!ec->wl_comp_data) return NULL; + if (!ec->comp_data) return NULL; if (!(sub_cdata = _e_comp_wl_client_subsurf_data_get(ec))) return NULL; return sub_cdata->parent; @@ -175,28 +173,28 @@ _e_comp_wl_surface_cb_attach(struct wl_client *client, struct wl_resource *resou } } - if (!ec->wl_comp_data) return; + if (!ec->comp_data) return; - if (ec->wl_comp_data->pending.buffer) - wl_list_remove(&ec->wl_comp_data->pending.buffer_destroy.link); + if (ec->comp_data->pending.buffer) + wl_list_remove(&ec->comp_data->pending.buffer_destroy.link); - ec->wl_comp_data->pending.x = sx; - ec->wl_comp_data->pending.y = sy; - ec->wl_comp_data->pending.w = 0; - ec->wl_comp_data->pending.h = 0; - ec->wl_comp_data->pending.buffer = buffer; - ec->wl_comp_data->pending.new_attach = EINA_TRUE; + ec->comp_data->pending.x = sx; + ec->comp_data->pending.y = sy; + ec->comp_data->pending.w = 0; + ec->comp_data->pending.h = 0; + ec->comp_data->pending.buffer = buffer; + ec->comp_data->pending.new_attach = EINA_TRUE; if (buffer) { struct wl_shm_buffer *b; b = wl_shm_buffer_get(buffer_resource); - ec->wl_comp_data->pending.w = wl_shm_buffer_get_width(b); - ec->wl_comp_data->pending.h = wl_shm_buffer_get_height(b); + ec->comp_data->pending.w = wl_shm_buffer_get_width(b); + ec->comp_data->pending.h = wl_shm_buffer_get_height(b); wl_signal_add(&buffer->destroy_signal, - &ec->wl_comp_data->pending.buffer_destroy); + &ec->comp_data->pending.buffer_destroy); } } @@ -214,13 +212,13 @@ _e_comp_wl_surface_cb_damage(struct wl_client *client EINA_UNUSED, struct wl_res ec = e_pixmap_find_client(E_PIXMAP_TYPE_WL, e_pixmap_window_get(cp)); if ((!ec) || (e_object_is_del(E_OBJECT(ec)))) return; - if (!ec->wl_comp_data) return; + if (!ec->comp_data) return; tmp = eina_tiler_new(ec->w ?: w, ec->h ?: h); eina_tiler_tile_size_set(tmp, 1, 1); eina_tiler_rect_add(tmp, &(Eina_Rectangle){x, y, w, h}); - eina_tiler_union(ec->wl_comp_data->pending.damage, tmp); + eina_tiler_union(ec->comp_data->pending.damage, tmp); eina_tiler_free(tmp); } @@ -233,11 +231,11 @@ _e_comp_wl_surface_cb_frame_destroy(struct wl_resource *resource) if (!(ec = wl_resource_get_user_data(resource))) return; if (e_object_is_del(E_OBJECT(ec))) return; - if (!ec->wl_comp_data) return; + if (!ec->comp_data) return; /* remove this frame callback from the list */ - ec->wl_comp_data->frames = - eina_list_remove(ec->wl_comp_data->frames, resource); + ec->comp_data->frames = + eina_list_remove(ec->comp_data->frames, resource); } static void @@ -254,7 +252,7 @@ _e_comp_wl_surface_cb_frame(struct wl_client *client, struct wl_resource *resour ec = e_pixmap_find_client(E_PIXMAP_TYPE_WL, e_pixmap_window_get(cp)); if ((!ec) || (e_object_is_del(E_OBJECT(ec)))) return; - if (!ec->wl_comp_data) return; + if (!ec->comp_data) return; /* create frame callback */ res = wl_resource_create(client, &wl_callback_interface, 1, callback); @@ -268,7 +266,7 @@ _e_comp_wl_surface_cb_frame(struct wl_client *client, struct wl_resource *resour _e_comp_wl_surface_cb_frame_destroy); /* add this frame callback to the client */ - ec->wl_comp_data->frames = eina_list_prepend(ec->wl_comp_data->frames, res); + ec->comp_data->frames = eina_list_prepend(ec->comp_data->frames, res); } static void @@ -286,7 +284,7 @@ _e_comp_wl_surface_cb_opaque_region_set(struct wl_client *client EINA_UNUSED, st ec = e_pixmap_find_client(E_PIXMAP_TYPE_WL, e_pixmap_window_get(cp)); if ((!ec) || (e_object_is_del(E_OBJECT(ec)))) return; - if (!ec->wl_comp_data) return; + if (!ec->comp_data) return; if (region_resource) { @@ -295,12 +293,12 @@ _e_comp_wl_surface_cb_opaque_region_set(struct wl_client *client EINA_UNUSED, st if (!(tmp = wl_resource_get_user_data(region_resource))) return; - eina_tiler_union(ec->wl_comp_data->pending.opaque, tmp); + eina_tiler_union(ec->comp_data->pending.opaque, tmp); } else { - eina_tiler_clear(ec->wl_comp_data->pending.opaque); - eina_tiler_rect_add(ec->wl_comp_data->pending.opaque, + eina_tiler_clear(ec->comp_data->pending.opaque); + eina_tiler_rect_add(ec->comp_data->pending.opaque, &(Eina_Rectangle){0, 0, ec->client.w, ec->client.h}); } } @@ -318,7 +316,7 @@ _e_comp_wl_surface_cb_input_region_set(struct wl_client *client EINA_UNUSED, str ec = e_pixmap_find_client(E_PIXMAP_TYPE_WL, e_pixmap_window_get(cp)); if ((!ec) || (e_object_is_del(E_OBJECT(ec)))) return; - if (!ec->wl_comp_data) return; + if (!ec->comp_data) return; if (region_resource) { @@ -327,12 +325,12 @@ _e_comp_wl_surface_cb_input_region_set(struct wl_client *client EINA_UNUSED, str if (!(tmp = wl_resource_get_user_data(region_resource))) return; - eina_tiler_union(ec->wl_comp_data->pending.input, tmp); + eina_tiler_union(ec->comp_data->pending.input, tmp); } else { - eina_tiler_clear(ec->wl_comp_data->pending.input); - eina_tiler_rect_add(ec->wl_comp_data->pending.input, + eina_tiler_clear(ec->comp_data->pending.input); + eina_tiler_rect_add(ec->comp_data->pending.input, &(Eina_Rectangle){0, 0, ec->client.w, ec->client.h}); } } @@ -349,8 +347,8 @@ _e_comp_wl_subsurface_destroy_internal(E_Client *ec) { if (sub_cdata->parent) { - sub_cdata->parent->wl_comp_data->sub.list - = eina_list_remove(sub_cdata->parent->wl_comp_data->sub.list, ec); + sub_cdata->parent->comp_data->sub.list + = eina_list_remove(sub_cdata->parent->comp_data->sub.list, ec); sub_cdata->parent = NULL; } @@ -365,7 +363,7 @@ _e_comp_wl_subsurface_destroy_internal(E_Client *ec) } free(sub_cdata); - ec->wl_comp_data->sub.cdata = NULL; + ec->comp_data->sub.cdata = NULL; e_object_del(E_OBJECT(ec)); } @@ -384,7 +382,7 @@ _e_comp_wl_subsurface_root_get(E_Client *ec) { E_Client *parent = NULL; - if (!ec->wl_comp_data) return ec; + if (!ec->comp_data) return ec; if (!_e_comp_wl_client_subsurf_data_get(ec)) return ec; if (!(parent = _e_comp_wl_subsurface_parent_get(ec))) return ec; @@ -409,10 +407,10 @@ _e_comp_wl_subsurface_is_synchronized(E_Comp_Wl_Subsurf *sub_cdata) static void _e_comp_wl_subsurface_commit_to_cache(E_Client *ec) { - E_Comp_Wl_Client_Data *cdata; + E_Comp_Client_Data *cdata; E_Comp_Wl_Subsurf *sub_cdata; - if (!(cdata = ec->wl_comp_data)) return; + if (!(cdata = ec->comp_data)) return; if (!(sub_cdata = cdata->sub.cdata)) return; // copy pending damage to cache, and clear pending damage. @@ -444,12 +442,12 @@ _e_comp_wl_subsurface_commit_to_cache(E_Client *ec) static void _e_comp_wl_subsurface_commit_from_cache(E_Client *ec) { - E_Comp_Wl_Client_Data *cdata; + E_Comp_Client_Data *cdata; E_Comp_Wl_Subsurf *sub_cdata; E_Pixmap *cp; Eina_Tiler *src, *tmp; - if (!(cdata = ec->wl_comp_data)) return; + if (!(cdata = ec->comp_data)) return; if (!(sub_cdata = cdata->sub.cdata)) return; if (!(cp = ec->pixmap)) return; @@ -580,74 +578,74 @@ _e_comp_wl_surface_commit(E_Client *ec) E_Pixmap *cp; Eina_Tiler *src, *tmp; - if (!ec->wl_comp_data) return; + if (!ec->comp_data) return; if (!(cp = ec->pixmap)) return; - if (ec->wl_comp_data->pending.new_attach) + if (ec->comp_data->pending.new_attach) { - _e_comp_wl_buffer_reference(&ec->wl_comp_data->buffer_ref, - ec->wl_comp_data->pending.buffer); + _e_comp_wl_buffer_reference(&ec->comp_data->buffer_ref, + ec->comp_data->pending.buffer); - e_pixmap_resource_set(cp, ec->wl_comp_data->pending.buffer->resource); - e_pixmap_usable_set(cp, (ec->wl_comp_data->pending.buffer != NULL)); + e_pixmap_resource_set(cp, ec->comp_data->pending.buffer->resource); + e_pixmap_usable_set(cp, (ec->comp_data->pending.buffer != NULL)); } e_pixmap_dirty(cp); e_pixmap_refresh(cp); - if ((ec->wl_comp_data->shell.surface) && - (ec->wl_comp_data->shell.configure)) + if ((ec->comp_data->shell.surface) && + (ec->comp_data->shell.configure)) { - if (ec->wl_comp_data->pending.new_attach) + if (ec->comp_data->pending.new_attach) { - if ((ec->client.w != ec->wl_comp_data->pending.w) || - (ec->client.h != ec->wl_comp_data->pending.h)) - ec->wl_comp_data->shell.configure(ec->wl_comp_data->shell.surface, + if ((ec->client.w != ec->comp_data->pending.w) || + (ec->client.h != ec->comp_data->pending.h)) + ec->comp_data->shell.configure(ec->comp_data->shell.surface, ec->client.x, ec->client.y, - ec->wl_comp_data->pending.w, - ec->wl_comp_data->pending.h); + ec->comp_data->pending.w, + ec->comp_data->pending.h); } } - if (ec->wl_comp_data->pending.new_attach) + if (ec->comp_data->pending.new_attach) { - if (!ec->wl_comp_data->pending.buffer) + if (!ec->comp_data->pending.buffer) { - if (ec->wl_comp_data->mapped) + if (ec->comp_data->mapped) { - if ((ec->wl_comp_data->shell.surface) && - (ec->wl_comp_data->shell.unmap)) - ec->wl_comp_data->shell.unmap(ec->wl_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); } } else { - if (!ec->wl_comp_data->mapped) + if (!ec->comp_data->mapped) { - if ((ec->wl_comp_data->shell.surface) && - (ec->wl_comp_data->shell.map)) - ec->wl_comp_data->shell.map(ec->wl_comp_data->shell.surface); + if ((ec->comp_data->shell.surface) && + (ec->comp_data->shell.map)) + ec->comp_data->shell.map(ec->comp_data->shell.surface); } } } /* reset pending buffer */ - if (ec->wl_comp_data->pending.buffer) - wl_list_remove(&ec->wl_comp_data->pending.buffer_destroy.link); + if (ec->comp_data->pending.buffer) + wl_list_remove(&ec->comp_data->pending.buffer_destroy.link); - ec->wl_comp_data->pending.x = 0; - ec->wl_comp_data->pending.y = 0; - ec->wl_comp_data->pending.w = 0; - ec->wl_comp_data->pending.h = 0; - ec->wl_comp_data->pending.buffer = NULL; - ec->wl_comp_data->pending.new_attach = EINA_FALSE; + ec->comp_data->pending.x = 0; + ec->comp_data->pending.y = 0; + ec->comp_data->pending.w = 0; + ec->comp_data->pending.h = 0; + ec->comp_data->pending.buffer = NULL; + ec->comp_data->pending.new_attach = EINA_FALSE; /* handle surface opaque region */ tmp = eina_tiler_new(ec->w, ec->h); eina_tiler_tile_size_set(tmp, 1, 1); eina_tiler_rect_add(tmp, &(Eina_Rectangle){0, 0, ec->client.w, ec->client.h}); - src = eina_tiler_intersection(ec->wl_comp_data->pending.opaque, tmp); + src = eina_tiler_intersection(ec->comp_data->pending.opaque, tmp); if (src) { Eina_Rectangle *rect; @@ -685,7 +683,7 @@ _e_comp_wl_surface_commit(E_Client *ec) } eina_tiler_free(tmp); - eina_tiler_clear(ec->wl_comp_data->pending.opaque); + eina_tiler_clear(ec->comp_data->pending.opaque); /* handle surface damages */ if ((!ec->comp->nocomp) && (ec->frame)) @@ -695,7 +693,7 @@ _e_comp_wl_surface_commit(E_Client *ec) eina_tiler_rect_add(tmp, &(Eina_Rectangle){0, 0, ec->client.w, ec->client.h}); - src = eina_tiler_intersection(ec->wl_comp_data->pending.damage, tmp); + src = eina_tiler_intersection(ec->comp_data->pending.damage, tmp); if (src) { Eina_Rectangle *rect; @@ -713,7 +711,7 @@ _e_comp_wl_surface_commit(E_Client *ec) eina_tiler_free(tmp); - eina_tiler_clear(ec->wl_comp_data->pending.damage); + eina_tiler_clear(ec->comp_data->pending.damage); } /* handle input regions */ @@ -721,7 +719,7 @@ _e_comp_wl_surface_commit(E_Client *ec) eina_tiler_tile_size_set(tmp, 1, 1); eina_tiler_rect_add(tmp, &(Eina_Rectangle){0, 0, ec->client.w, ec->client.h}); - src = eina_tiler_intersection(ec->wl_comp_data->pending.input, tmp); + src = eina_tiler_intersection(ec->comp_data->pending.input, tmp); if (src) { Eina_Rectangle *rect; @@ -760,7 +758,7 @@ _e_comp_wl_surface_commit(E_Client *ec) } eina_tiler_free(tmp); - eina_tiler_clear(ec->wl_comp_data->pending.input); + eina_tiler_clear(ec->comp_data->pending.input); ec->changes.shape_input = EINA_TRUE; EC_CHANGED(ec); @@ -794,7 +792,7 @@ _e_comp_wl_subsurface_parent_commit(E_Client *ec, Eina_Bool parent_is_synchroniz if (sub_cdata->cached.has_data) _e_comp_wl_subsurface_commit_from_cache(ec); - EINA_LIST_FOREACH(ec->wl_comp_data->sub.list, l, subc) + EINA_LIST_FOREACH(ec->comp_data->sub.list, l, subc) { if (ec != subc) _e_comp_wl_subsurface_parent_commit(subc, EINA_TRUE); @@ -810,13 +808,13 @@ _e_comp_wl_subsurface_commit(E_Client *ec) Eina_List *l; int w, h; - if (!ec->wl_comp_data) return; + if (!ec->comp_data) return; sub_cdata = _e_comp_wl_client_subsurf_data_get(ec); if (!sub_cdata) return; - ec->client.w = ec->wl_comp_data->pending.w; - ec->client.h = ec->wl_comp_data->pending.h; + ec->client.w = ec->comp_data->pending.w; + ec->client.h = ec->comp_data->pending.h; evas_object_geometry_get(ec->frame, NULL, NULL, &w, &h); if ((ec->client.w != w) || (ec->client.h != h)) @@ -837,7 +835,7 @@ _e_comp_wl_subsurface_commit(E_Client *ec) } else _e_comp_wl_surface_commit(ec); - EINA_LIST_FOREACH(ec->wl_comp_data->sub.list, l, subc) + EINA_LIST_FOREACH(ec->comp_data->sub.list, l, subc) { if (ec != subc) _e_comp_wl_subsurface_parent_commit(subc, EINA_FALSE); @@ -861,7 +859,7 @@ _e_comp_wl_surface_cb_commit(struct wl_client *client EINA_UNUSED, struct wl_res if ((!ec) || (e_object_is_del(E_OBJECT(ec)))) return; - if (!ec->wl_comp_data) return; + if (!ec->comp_data) return; if (_e_comp_wl_client_subsurf_data_get(ec)) { @@ -873,7 +871,7 @@ _e_comp_wl_surface_cb_commit(struct wl_client *client EINA_UNUSED, struct wl_res // ec for main surface. _e_comp_wl_surface_commit(ec); - EINA_LIST_FOREACH(ec->wl_comp_data->sub.list, l, subc) + EINA_LIST_FOREACH(ec->comp_data->sub.list, l, subc) { if (subc != ec) _e_comp_wl_subsurface_parent_commit(subc, EINA_FALSE); @@ -1056,10 +1054,10 @@ _e_comp_wl_evas_cb_move(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_U if (!(ec = data)) return; - EINA_LIST_FOREACH(ec->wl_comp_data->sub.list, l, subc) + EINA_LIST_FOREACH(ec->comp_data->sub.list, l, subc) { - x = ec->x + subc->wl_comp_data->sub.cdata->position.x; - y = ec->y + subc->wl_comp_data->sub.cdata->position.y; + x = ec->x + subc->comp_data->sub.cdata->position.x; + y = ec->y + subc->comp_data->sub.cdata->position.y; evas_object_move(subc->frame, x, y); } } @@ -1080,7 +1078,7 @@ _e_comp_wl_cb_client_iconify(void *data EINA_UNUSED, int type EINA_UNUSED, void if (!ec->iconic) e_client_iconify(ec); } - EINA_LIST_FOREACH(ec->wl_comp_data->sub.list, l, subc) + EINA_LIST_FOREACH(ec->comp_data->sub.list, l, subc) { if (subc->iconic) continue; e_client_iconify(subc); @@ -1105,7 +1103,7 @@ _e_comp_wl_cb_client_uniconify(void *data EINA_UNUSED, int type EINA_UNUSED, voi if (ec->iconic) e_client_uniconify(ec); } - EINA_LIST_FOREACH(ec->wl_comp_data->sub.list, l, subc) + EINA_LIST_FOREACH(ec->comp_data->sub.list, l, subc) { if (!subc->iconic) continue; e_client_uniconify(subc); @@ -1151,8 +1149,8 @@ _e_comp_wl_cb_render_post(void *data EINA_UNUSED, Evas *evas EINA_UNUSED, void * { struct wl_resource *cb; - if (!ec->wl_comp_data) continue; - EINA_LIST_FREE(ec->wl_comp_data->frames, cb) + if (!ec->comp_data) continue; + EINA_LIST_FREE(ec->comp_data->frames, cb) { wl_callback_send_done(cb, (ecore_loop_time_get() * 1000)); wl_resource_destroy(cb); @@ -1162,7 +1160,7 @@ _e_comp_wl_cb_render_post(void *data EINA_UNUSED, Evas *evas EINA_UNUSED, void * /* TODO: FIXME: We need a way to determine if the client wants to * keep the buffer or not. If so, then we should Not be setting NULL * here as this will essentially release the buffer */ - _e_comp_wl_buffer_reference(&ec->wl_comp_data->buffer_ref, NULL); + _e_comp_wl_buffer_reference(&ec->comp_data->buffer_ref, NULL); } eina_iterator_free(itr); @@ -1171,7 +1169,7 @@ _e_comp_wl_cb_render_post(void *data EINA_UNUSED, Evas *evas EINA_UNUSED, void * static void _e_comp_wl_cb_del(E_Comp *comp) { - E_Comp_Wl_Data *cdata; + E_Comp_Data *cdata; cdata = comp->wl_comp_data; @@ -1197,7 +1195,7 @@ _e_comp_wl_cb_del(E_Comp *comp) static Eina_Bool _e_comp_wl_cb_read(void *data, Ecore_Fd_Handler *hdl EINA_UNUSED) { - E_Comp_Wl_Data *cdata; + E_Comp_Data *cdata; if (!(cdata = data)) return ECORE_CALLBACK_RENEW; if (!cdata->wl.disp) return ECORE_CALLBACK_RENEW; @@ -1214,7 +1212,7 @@ _e_comp_wl_cb_read(void *data, Ecore_Fd_Handler *hdl EINA_UNUSED) static Eina_Bool _e_comp_wl_cb_idle(void *data) { - E_Comp_Wl_Data *cdata; + E_Comp_Data *cdata; if (!(cdata = data)) return ECORE_CALLBACK_RENEW; if (!cdata->wl.disp) return ECORE_CALLBACK_RENEW; @@ -1232,7 +1230,7 @@ static Eina_Bool _e_comp_wl_cb_module_idle(void *data) { E_Module *mod = NULL; - E_Comp_Wl_Data *cdata; + E_Comp_Data *cdata; if (!(cdata = data)) return ECORE_CALLBACK_RENEW; @@ -1261,7 +1259,7 @@ _e_comp_wl_cb_first_draw(void *data) E_Client *ec; if (!(ec = data)) return EINA_TRUE; - ec->wl_comp_data->first_draw_tmr = NULL; + ec->comp_data->first_draw_tmr = NULL; e_comp_object_damage(ec->frame, 0, 0, ec->w, ec->h); return EINA_FALSE; } @@ -1272,9 +1270,9 @@ _e_comp_wl_subsurface_restack(E_Client *ec) E_Client *subc, *below = NULL; Eina_List *l; - if (!ec->wl_comp_data->sub.list) return; + if (!ec->comp_data->sub.list) return; - EINA_LIST_REVERSE_FOREACH(ec->wl_comp_data->sub.list, l, subc) + EINA_LIST_REVERSE_FOREACH(ec->comp_data->sub.list, l, subc) { if (subc->iconic) continue; if (below) @@ -1283,7 +1281,7 @@ _e_comp_wl_subsurface_restack(E_Client *ec) evas_object_stack_above(subc->frame, ec->frame); below = subc; - if (subc->wl_comp_data->sub.list) + if (subc->comp_data->sub.list) _e_comp_wl_subsurface_restack(subc); } } @@ -1297,21 +1295,21 @@ _e_comp_wl_client_idler(void *data EINA_UNUSED) EINA_LIST_FREE(_idle_clients, ec) { - if ((e_object_is_del(E_OBJECT(ec))) || (!ec->wl_comp_data)) continue; + if ((e_object_is_del(E_OBJECT(ec))) || (!ec->comp_data)) continue; ec->post_move = 0; ec->post_resize = 0; - if (ec->wl_comp_data->sub.restack_target) + if (ec->comp_data->sub.restack_target) { if (ec->layer_block) continue; // for blocking evas object restack callback. restacking = EINA_TRUE; - if (ec->wl_comp_data->sub.restack_target != ec) - evas_object_stack_below(ec->frame, ec->wl_comp_data->sub.restack_target->frame); + if (ec->comp_data->sub.restack_target != ec) + evas_object_stack_below(ec->frame, ec->comp_data->sub.restack_target->frame); _e_comp_wl_subsurface_restack(ec); - ec->wl_comp_data->sub.restack_target = NULL; + ec->comp_data->sub.restack_target = NULL; restacking = EINA_FALSE; } } @@ -1349,14 +1347,14 @@ _e_comp_wl_evas_cb_restack(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EIN if (restacking) return; if (!(ec = data)) return; - if ((!ec->wl_comp_data->sub.list) && + if ((!ec->comp_data->sub.list) && (!_e_comp_wl_client_subsurf_data_get(ec))) return; parent = ec; if (_e_comp_wl_client_subsurf_data_get(ec)) parent = _e_comp_wl_subsurface_root_get(ec); - parent->wl_comp_data->sub.restack_target = ec; + parent->comp_data->sub.restack_target = ec; _e_comp_wl_client_idler_add(parent); } @@ -1395,11 +1393,11 @@ _e_comp_wl_subsurface_cb_place_above(struct wl_client *client EINA_UNUSED, struc _e_comp_wl_subsurface_parent_get(sibling)) return; if (!(parent = _e_comp_wl_subsurface_parent_get(ec))) return; - parent->wl_comp_data->sub.list = - eina_list_remove(parent->wl_comp_data->sub.list, ec); - parent->wl_comp_data->sub.list = - eina_list_append_relative(parent->wl_comp_data->sub.list, ec, sibling); - parent->wl_comp_data->sub.restack_target = parent; + parent->comp_data->sub.list = + eina_list_remove(parent->comp_data->sub.list, ec); + parent->comp_data->sub.list = + eina_list_append_relative(parent->comp_data->sub.list, ec, sibling); + parent->comp_data->sub.restack_target = parent; _e_comp_wl_client_idler_add(parent); } @@ -1418,11 +1416,11 @@ _e_comp_wl_subsurface_cb_place_below(struct wl_client *client EINA_UNUSED, struc _e_comp_wl_subsurface_parent_get(sibling)) return; if (!(parent = _e_comp_wl_subsurface_parent_get(ec))) return; - parent->wl_comp_data->sub.list = - eina_list_remove(parent->wl_comp_data->sub.list, ec); - parent->wl_comp_data->sub.list = - eina_list_prepend_relative(parent->wl_comp_data->sub.list, ec, sibling); - parent->wl_comp_data->sub.restack_target = parent; + parent->comp_data->sub.list = + eina_list_remove(parent->comp_data->sub.list, ec); + parent->comp_data->sub.list = + eina_list_prepend_relative(parent->comp_data->sub.list, ec, sibling); + parent->comp_data->sub.restack_target = parent; _e_comp_wl_client_idler_add(parent); } @@ -1498,8 +1496,8 @@ _e_comp_wl_subsurface_create(E_Client *ec, E_Client *pc, uint32_t id, struct wl_ ec->lock_focus_in = ec->lock_focus_out = EINA_TRUE; ec->netwm.state.skip_taskbar = EINA_TRUE; ec->netwm.state.skip_pager = EINA_TRUE; - ec->wl_comp_data->surface = surface_resource; - ec->wl_comp_data->sub.cdata = sub_cdata; + ec->comp_data->surface = surface_resource; + ec->comp_data->sub.cdata = sub_cdata; evas_object_pass_events_set(ec->frame, EINA_TRUE); evas_object_event_callback_add(ec->frame, EVAS_CALLBACK_RESTACK, @@ -1507,9 +1505,9 @@ _e_comp_wl_subsurface_create(E_Client *ec, E_Client *pc, uint32_t id, struct wl_ if (pc) { - E_Comp_Wl_Client_Data *cdata; + E_Comp_Client_Data *cdata; - cdata = pc->wl_comp_data; + cdata = pc->comp_data; if (cdata) cdata->sub.list = eina_list_append(cdata->sub.list, ec); @@ -1576,7 +1574,7 @@ _e_comp_wl_subcomp_cb_subsurface_get(struct wl_client *client EINA_UNUSED, struc return; } - if (!ec->wl_comp_data) + if (!ec->comp_data) { e_object_del(E_OBJECT(ec)); return; @@ -1625,7 +1623,7 @@ static Eina_Bool _e_comp_wl_compositor_create(void) { E_Comp *comp; - E_Comp_Wl_Data *cdata; + E_Comp_Data *cdata; char buff[PATH_MAX]; /* char *rules, *model, *layout; */ int fd = 0; @@ -1641,7 +1639,7 @@ _e_comp_wl_compositor_create(void) /* check compositor type and make sure it's Wayland */ /* if (comp->comp_type != E_PIXMAP_TYPE_WL) return EINA_FALSE; */ - cdata = E_NEW(E_Comp_Wl_Data, 1); + cdata = E_NEW(E_Comp_Data, 1); comp->wl_comp_data = cdata; /* setup wayland display environment variable */ @@ -1865,8 +1863,8 @@ _e_comp_wl_evas_cb_show(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EIN if (!ec->override) e_hints_window_visible_set(ec); - if (ec->wl_comp_data->frame_update) - ec->wl_comp_data->frame_update = EINA_FALSE; + if (ec->comp_data->frame_update) + ec->comp_data->frame_update = EINA_FALSE; EINA_LIST_FOREACH(ec->e.state.video_child, l, tmp) evas_object_show(tmp->frame); @@ -1896,16 +1894,16 @@ _e_comp_wl_evas_cb_mouse_in(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj ev = event; if (!(ec = data)) return; - if (!ec->wl_comp_data) return; + if (!ec->comp_data) return; if (e_object_is_del(E_OBJECT(ec))) return; - wc = wl_resource_get_client(ec->wl_comp_data->surface); + wc = wl_resource_get_client(ec->comp_data->surface); serial = wl_display_next_serial(ec->comp->wl_comp_data->wl.disp); EINA_LIST_FOREACH(ec->comp->wl_comp_data->ptr.resources, l, res) { if (!e_comp_wl_input_pointer_check(res)) continue; if (wl_resource_get_client(res) != wc) continue; - wl_pointer_send_enter(res, serial, ec->wl_comp_data->surface, + wl_pointer_send_enter(res, serial, ec->comp_data->surface, wl_fixed_from_int(ev->canvas.x), wl_fixed_from_int(ev->canvas.y)); } @@ -1921,17 +1919,17 @@ _e_comp_wl_evas_cb_mouse_out(void *data, Evas *evas EINA_UNUSED, Evas_Object *ob uint32_t serial; if (!(ec = data)) return; - if (!ec->wl_comp_data) return; + if (!ec->comp_data) return; if (ec->cur_mouse_action) return; if (e_object_is_del(E_OBJECT(ec))) return; - wc = wl_resource_get_client(ec->wl_comp_data->surface); + wc = wl_resource_get_client(ec->comp_data->surface); serial = wl_display_next_serial(ec->comp->wl_comp_data->wl.disp); EINA_LIST_FOREACH(ec->comp->wl_comp_data->ptr.resources, l, res) { if (!e_comp_wl_input_pointer_check(res)) continue; if (wl_resource_get_client(res) != wc) continue; - wl_pointer_send_leave(res, serial, ec->wl_comp_data->surface); + wl_pointer_send_leave(res, serial, ec->comp_data->surface); } } @@ -1969,7 +1967,7 @@ _e_comp_wl_evas_cb_mouse_down(void *data, Evas *evas EINA_UNUSED, Evas_Object *o ec->comp->wl_comp_data->ptr.button = btn; - wc = wl_resource_get_client(ec->wl_comp_data->surface); + wc = wl_resource_get_client(ec->comp_data->surface); serial = wl_display_next_serial(ec->comp->wl_comp_data->wl.disp); EINA_LIST_FOREACH(ec->comp->wl_comp_data->ptr.resources, l, res) { @@ -2015,7 +2013,7 @@ _e_comp_wl_evas_cb_mouse_up(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj ec->comp->wl_comp_data->resize.resource = NULL; ec->comp->wl_comp_data->ptr.button = btn; - wc = wl_resource_get_client(ec->wl_comp_data->surface); + wc = wl_resource_get_client(ec->comp_data->surface); serial = wl_display_next_serial(ec->comp->wl_comp_data->wl.disp); EINA_LIST_FOREACH(ec->comp->wl_comp_data->ptr.resources, l, res) { @@ -2052,7 +2050,7 @@ _e_comp_wl_evas_cb_mouse_wheel(void *data, Evas *evas EINA_UNUSED, Evas_Object * else dir = wl_fixed_from_int(ev->z); - wc = wl_resource_get_client(ec->wl_comp_data->surface); + wc = wl_resource_get_client(ec->comp_data->surface); EINA_LIST_FOREACH(ec->comp->wl_comp_data->ptr.resources, l, res) { if (!e_comp_wl_input_pointer_check(res)) continue; @@ -2081,7 +2079,7 @@ _e_comp_wl_evas_cb_mouse_move(void *data, Evas *evas EINA_UNUSED, Evas_Object *o ec->comp->wl_comp_data->ptr.y = wl_fixed_from_int(ev->cur.canvas.y - ec->client.y); - wc = wl_resource_get_client(ec->wl_comp_data->surface); + wc = wl_resource_get_client(ec->comp_data->surface); EINA_LIST_FOREACH(ec->comp->wl_comp_data->ptr.resources, l, res) { if (!e_comp_wl_input_pointer_check(res)) continue; @@ -2096,7 +2094,7 @@ static void _e_comp_wl_evas_cb_key_down(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event) { E_Client *ec; - E_Comp_Wl_Data *cdata; + E_Comp_Data *cdata; Evas_Event_Key_Down *ev; uint32_t serial, *end, *k, keycode; struct wl_resource *res; @@ -2127,7 +2125,7 @@ _e_comp_wl_evas_cb_key_down(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj /* update modifier state */ e_comp_wl_input_keyboard_state_update(cdata, keycode, EINA_TRUE); - wc = wl_resource_get_client(ec->wl_comp_data->surface); + wc = wl_resource_get_client(ec->comp_data->surface); serial = wl_display_next_serial(ec->comp->wl_comp_data->wl.disp); EINA_LIST_FOREACH(ec->comp->wl_comp_data->kbd.resources, l, res) { @@ -2141,7 +2139,7 @@ static void _e_comp_wl_evas_cb_key_up(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event) { E_Client *ec; - E_Comp_Wl_Data *cdata; + E_Comp_Data *cdata; Evas_Event_Key_Up *ev; uint32_t serial, *end, *k, keycode; struct wl_resource *res; @@ -2163,7 +2161,7 @@ _e_comp_wl_evas_cb_key_up(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj E cdata->kbd.keys.size = (const char *)end - (const char *)cdata->kbd.keys.data; - wc = wl_resource_get_client(ec->wl_comp_data->surface); + wc = wl_resource_get_client(ec->comp_data->surface); serial = wl_display_next_serial(cdata->wl.disp); EINA_LIST_FOREACH(cdata->kbd.resources, l, res) { @@ -2180,7 +2178,7 @@ static void _e_comp_wl_evas_cb_focus_in(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED) { E_Client *ec, *focused; - E_Comp_Wl_Data *cdata; + E_Comp_Data *cdata; struct wl_resource *res; struct wl_client *wc; Eina_List *l; @@ -2207,12 +2205,12 @@ _e_comp_wl_evas_cb_focus_in(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj wl_array_for_each(k, &cdata->kbd.keys) e_comp_wl_input_keyboard_state_update(cdata, *k, EINA_TRUE); - wc = wl_resource_get_client(ec->wl_comp_data->surface); + wc = wl_resource_get_client(ec->comp_data->surface); serial = wl_display_next_serial(cdata->wl.disp); EINA_LIST_FOREACH(cdata->kbd.resources, l, res) { if (wl_resource_get_client(res) != wc) continue; - wl_keyboard_send_enter(res, serial, ec->wl_comp_data->surface, + wl_keyboard_send_enter(res, serial, ec->comp_data->surface, &cdata->kbd.keys); } } @@ -2236,12 +2234,12 @@ _e_comp_wl_evas_cb_focus_out(void *data, Evas *evas EINA_UNUSED, Evas_Object *ob wl_array_for_each(k, &ec->comp->wl_comp_data->kbd.keys) e_comp_wl_input_keyboard_state_update(ec->comp->wl_comp_data, *k, EINA_FALSE); - wc = wl_resource_get_client(ec->wl_comp_data->surface); + wc = wl_resource_get_client(ec->comp_data->surface); serial = wl_display_next_serial(ec->comp->wl_comp_data->wl.disp); EINA_LIST_FOREACH(ec->comp->wl_comp_data->kbd.resources, l, res) { if (wl_resource_get_client(res) != wc) continue; - wl_keyboard_send_leave(res, serial, ec->wl_comp_data->surface); + wl_keyboard_send_leave(res, serial, ec->comp_data->surface); } } @@ -2249,7 +2247,7 @@ static void _e_comp_wl_evas_cb_resize(void *data, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED) { E_Client *ec; - E_Comp_Wl_Data *cdata; + E_Comp_Data *cdata; if (!(ec = data)) return; if ((ec->shading) || (ec->shaded)) return; @@ -2260,22 +2258,22 @@ _e_comp_wl_evas_cb_resize(void *data, Evas_Object *obj EINA_UNUSED, void *event cdata = ec->comp->wl_comp_data; - if ((ec->wl_comp_data) && (ec->wl_comp_data->shell.configure_send)) - ec->wl_comp_data->shell.configure_send(ec->wl_comp_data->shell.surface, + if ((ec->comp_data) && (ec->comp_data->shell.configure_send)) + ec->comp_data->shell.configure_send(ec->comp_data->shell.surface, cdata->resize.edges, ec->client.w, ec->client.h); - if (ec->wl_comp_data) + if (ec->comp_data) { - if (ec->wl_comp_data->pending.damage) - eina_tiler_area_size_set(ec->wl_comp_data->pending.damage, + if (ec->comp_data->pending.damage) + eina_tiler_area_size_set(ec->comp_data->pending.damage, ec->client.w, ec->client.h); - if (ec->wl_comp_data->pending.input) - eina_tiler_area_size_set(ec->wl_comp_data->pending.input, + if (ec->comp_data->pending.input) + eina_tiler_area_size_set(ec->comp_data->pending.input, ec->client.w, ec->client.h); - if (ec->wl_comp_data->pending.opaque) - eina_tiler_area_size_set(ec->wl_comp_data->pending.opaque, + if (ec->comp_data->pending.opaque) + eina_tiler_area_size_set(ec->comp_data->pending.opaque, ec->client.w, ec->client.h); } @@ -2293,12 +2291,12 @@ _e_comp_wl_evas_cb_frame_recalc(void *data, Evas_Object *obj, void *event) fr = event; if (!(ec = data)) return; - if (!ec->wl_comp_data) return; + if (!ec->comp_data) return; WRN("COMP_WL Frame Recalc: %d %d %d %d", fr->l, fr->r, fr->t, fr->b); if (evas_object_visible_get(obj)) - ec->wl_comp_data->frame_update = EINA_FALSE; + ec->comp_data->frame_update = EINA_FALSE; else - ec->wl_comp_data->frame_update = EINA_TRUE; + ec->comp_data->frame_update = EINA_TRUE; ec->post_move = ec->post_resize = EINA_TRUE; _e_comp_wl_client_idler_add(ec); } @@ -2336,9 +2334,9 @@ _e_comp_wl_evas_cb_delete_request(void *data, Evas_Object *obj EINA_UNUSED, void comp = ec->comp; e_comp_ignore_win_del(E_PIXMAP_TYPE_WL, e_pixmap_window_get(ec->pixmap)); - if (ec->wl_comp_data) + if (ec->comp_data) { - if (ec->wl_comp_data->reparented) + if (ec->comp_data->reparented) e_client_comp_hidden_set(ec, EINA_TRUE); } @@ -2364,9 +2362,9 @@ _e_comp_wl_evas_cb_kill_request(void *data, Evas_Object *obj EINA_UNUSED, void * comp = ec->comp; e_comp_ignore_win_del(E_PIXMAP_TYPE_WL, e_pixmap_window_get(ec->pixmap)); - if (ec->wl_comp_data) + if (ec->comp_data) { - if (ec->wl_comp_data->reparented) + if (ec->comp_data->reparented) e_client_comp_hidden_set(ec, EINA_TRUE); } @@ -2383,12 +2381,12 @@ _e_comp_wl_evas_cb_ping(void *data, Evas_Object *obj EINA_UNUSED, void *event EI E_Client *ec; if (!(ec = data)) return; - if (!ec->wl_comp_data) return; + if (!ec->comp_data) return; - if (ec->wl_comp_data->shell.ping) + if (ec->comp_data->shell.ping) { - if (ec->wl_comp_data->shell.surface) - ec->wl_comp_data->shell.ping(ec->wl_comp_data->shell.surface); + if (ec->comp_data->shell.surface) + ec->comp_data->shell.ping(ec->comp_data->shell.surface); } } @@ -2399,7 +2397,7 @@ _e_comp_wl_evas_cb_color_set(void *data, Evas_Object *obj, void *event EINA_UNUS int a = 0; if (!(ec = data)) return; - if (!ec->wl_comp_data) return; + if (!ec->comp_data) return; evas_object_color_get(obj, NULL, NULL, NULL, &a); if (ec->netwm.opacity == a) return; ec->netwm.opacity = a; @@ -2410,9 +2408,9 @@ _e_comp_wl_evas_cb_color_set(void *data, Evas_Object *obj, void *event EINA_UNUS static void _e_comp_wl_client_evas_init(E_Client *ec) { - if (!ec->wl_comp_data) return; - if (ec->wl_comp_data->evas_init) return; - ec->wl_comp_data->evas_init = EINA_TRUE; + if (!ec->comp_data) return; + if (ec->comp_data->evas_init) return; + ec->comp_data->evas_init = EINA_TRUE; evas_object_event_callback_add(ec->frame, EVAS_CALLBACK_SHOW, _e_comp_wl_evas_cb_show, ec); @@ -2486,7 +2484,7 @@ _e_comp_wl_client_new_helper(E_Client *ec) if ((!e_client_util_ignored_get(ec)) && (!ec->internal) && (!ec->internal_ecore_evas)) { - ec->wl_comp_data->need_reparent = EINA_TRUE; + ec->comp_data->need_reparent = EINA_TRUE; EC_CHANGED(ec); ec->take_focus = !starting; } @@ -2587,21 +2585,21 @@ _e_comp_wl_cb_hook_client_del(void *data EINA_UNUSED, E_Client *ec) E_COMP_WL_PIXMAP_CHECK; - if ((!ec->already_unparented) && (ec->wl_comp_data->reparented)) + if ((!ec->already_unparented) && (ec->comp_data->reparented)) _e_comp_wl_focus_down_set(ec); ec->already_unparented = EINA_TRUE; win = e_pixmap_window_get(ec->pixmap); eina_hash_del_by_key(clients_win_hash, &win); - if (ec->wl_comp_data->pending.damage) - eina_tiler_free(ec->wl_comp_data->pending.damage); - if (ec->wl_comp_data->pending.input) - eina_tiler_free(ec->wl_comp_data->pending.input); - if (ec->wl_comp_data->pending.opaque) - eina_tiler_free(ec->wl_comp_data->pending.opaque); + if (ec->comp_data->pending.damage) + eina_tiler_free(ec->comp_data->pending.damage); + if (ec->comp_data->pending.input) + eina_tiler_free(ec->comp_data->pending.input); + if (ec->comp_data->pending.opaque) + eina_tiler_free(ec->comp_data->pending.opaque); - if (ec->wl_comp_data->reparented) + if (ec->comp_data->reparented) { win = e_client_util_pwin_get(ec); eina_hash_del_by_key(clients_win_hash, &win); @@ -2614,18 +2612,18 @@ _e_comp_wl_cb_hook_client_del(void *data EINA_UNUSED, E_Client *ec) ec->parent->modal = NULL; } - if (ec->wl_comp_data->sub.list) + if (ec->comp_data->sub.list) { E_Client *subc; - EINA_LIST_FREE(ec->wl_comp_data->sub.list, subc) + EINA_LIST_FREE(ec->comp_data->sub.list, subc) _e_comp_wl_subsurface_destroy_internal(subc); } - E_FREE_FUNC(ec->wl_comp_data->first_draw_tmr, ecore_timer_del); + E_FREE_FUNC(ec->comp_data->first_draw_tmr, ecore_timer_del); - E_FREE(ec->wl_comp_data); - ec->wl_comp_data = NULL; + E_FREE(ec->comp_data); + ec->comp_data = NULL; _e_comp_wl_focus_check(ec->comp); } @@ -2645,33 +2643,33 @@ _e_comp_wl_cb_hook_client_new(void *data EINA_UNUSED, E_Client *ec) * basically nothing */ if (ec->internal) ec->icccm.delete_request = EINA_TRUE; - ec->wl_comp_data = E_NEW(E_Comp_Wl_Client_Data, 1); + ec->comp_data = E_NEW(E_Comp_Client_Data, 1); - ec->wl_comp_data->pending.damage = eina_tiler_new(ec->w, ec->h); - eina_tiler_tile_size_set(ec->wl_comp_data->pending.damage, 1, 1); + ec->comp_data->pending.damage = eina_tiler_new(ec->w, ec->h); + eina_tiler_tile_size_set(ec->comp_data->pending.damage, 1, 1); - ec->wl_comp_data->pending.input = eina_tiler_new(ec->w, ec->h); - eina_tiler_tile_size_set(ec->wl_comp_data->pending.input, 1, 1); + ec->comp_data->pending.input = eina_tiler_new(ec->w, ec->h); + eina_tiler_tile_size_set(ec->comp_data->pending.input, 1, 1); - ec->wl_comp_data->pending.opaque = eina_tiler_new(ec->w, ec->h); - eina_tiler_tile_size_set(ec->wl_comp_data->pending.opaque, 1, 1); + ec->comp_data->pending.opaque = eina_tiler_new(ec->w, ec->h); + eina_tiler_tile_size_set(ec->comp_data->pending.opaque, 1, 1); - ec->wl_comp_data->pending.buffer_destroy.notify = + ec->comp_data->pending.buffer_destroy.notify = _e_comp_wl_buffer_pending_cb_destroy; - ec->wl_comp_data->mapped = EINA_FALSE; - ec->wl_comp_data->set_win_type = EINA_TRUE; + ec->comp_data->mapped = EINA_FALSE; + ec->comp_data->set_win_type = EINA_TRUE; ec->netwm.type = E_WINDOW_TYPE_UNKNOWN; ec->changes.shape = EINA_TRUE; ec->changes.shape_input = EINA_TRUE; if (!_e_comp_wl_client_new_helper(ec)) return; - ec->wl_comp_data->first_damage = ((ec->internal) || (ec->override)); + ec->comp_data->first_damage = ((ec->internal) || (ec->override)); eina_hash_add(clients_win_hash, &win, ec); e_hints_client_list_set(); - ec->wl_comp_data->first_draw_tmr = + ec->comp_data->first_draw_tmr = ecore_timer_add(e_comp_config_get()->first_draw_delay, _e_comp_wl_cb_first_draw, ec); } @@ -2704,7 +2702,7 @@ _e_comp_wl_cb_hook_client_eval_fetch(void *data EINA_UNUSED, E_Client *ec) { e_hints_window_type_get(ec); if (((!ec->lock_border) || (!ec->border.name)) && - (ec->wl_comp_data->reparented)) + (ec->comp_data->reparented)) { ec->border.changed = EINA_TRUE; EC_CHANGED(ec); @@ -2798,17 +2796,17 @@ _e_comp_wl_cb_hook_client_eval_fetch(void *data EINA_UNUSED, E_Client *ec) /* Eina_Rectangle *shape = NULL; */ /* Eina_Bool pshaped = EINA_FALSE; */ - /* shape = eina_rectangle_new((ec->wl_comp_data->shape)->x, */ - /* (ec->wl_comp_data->shape)->y, */ - /* (ec->wl_comp_data->shape)->w, */ - /* (ec->wl_comp_data->shape)->h); */ + /* shape = eina_rectangle_new((ec->comp_data->shape)->x, */ + /* (ec->comp_data->shape)->y, */ + /* (ec->comp_data->shape)->w, */ + /* (ec->comp_data->shape)->h); */ /* pshaped = ec->shaped; */ /* ec->changes.shape = EINA_FALSE; */ /* if (eina_rectangle_is_empty(shape)) */ /* { */ - /* if ((ec->shaped) && (ec->wl_comp_data->reparented) && */ + /* if ((ec->shaped) && (ec->comp_data->reparented) && */ /* (!ec->bordername)) */ /* { */ /* ec->border.changed = EINA_TRUE; */ @@ -2842,7 +2840,7 @@ _e_comp_wl_cb_hook_client_eval_fetch(void *data EINA_UNUSED, E_Client *ec) /* if (ec->shaped) */ /* { */ /* ec->shaped = EINA_FALSE; */ - /* if ((ec->wl_comp_data->reparented) && (!ec->bordername)) */ + /* if ((ec->comp_data->reparented) && (!ec->bordername)) */ /* { */ /* ec->border.changed = EINA_TRUE; */ /* EC_CHANGED(ec); */ @@ -2851,9 +2849,9 @@ _e_comp_wl_cb_hook_client_eval_fetch(void *data EINA_UNUSED, E_Client *ec) /* } */ /* else */ /* { */ - /* if (ec->wl_comp_data->reparented) */ + /* if (ec->comp_data->reparented) */ /* { */ - /* EINA_RECTANGLE_SET(ec->wl_comp_data->shape, */ + /* EINA_RECTANGLE_SET(ec->comp_data->shape, */ /* shape->x, shape->y, */ /* shape->w, shape->h); */ @@ -2893,7 +2891,7 @@ _e_comp_wl_cb_hook_client_eval_fetch(void *data EINA_UNUSED, E_Client *ec) e_hints_window_state_set(ec); if (((!ec->lock_border) || (!ec->border.name)) && (!(((ec->maximized & E_MAXIMIZE_TYPE) == E_MAXIMIZE_FULLSCREEN))) && - (ec->wl_comp_data->reparented)) + (ec->comp_data->reparented)) { ec->border.changed = EINA_TRUE; EC_CHANGED(ec); @@ -3021,11 +3019,11 @@ _e_comp_wl_cb_hook_client_eval_fetch(void *data EINA_UNUSED, E_Client *ec) } ec->changes.prop = EINA_FALSE; - if (!ec->wl_comp_data->reparented) ec->changes.border = EINA_FALSE; + if (!ec->comp_data->reparented) ec->changes.border = EINA_FALSE; if (ec->changes.icon) { - if (ec->wl_comp_data->reparented) return; - ec->wl_comp_data->change_icon = EINA_TRUE; + if (ec->comp_data->reparented) return; + ec->comp_data->change_icon = EINA_TRUE; ec->changes.icon = EINA_FALSE; } } @@ -3037,7 +3035,7 @@ _e_comp_wl_cb_hook_client_pre_frame(void *data EINA_UNUSED, E_Client *ec) E_COMP_WL_PIXMAP_CHECK; - if (!ec->wl_comp_data->need_reparent) return; + if (!ec->comp_data->need_reparent) return; /* WRN("Client Needs New Parent in Pre Frame"); */ @@ -3059,7 +3057,7 @@ _e_comp_wl_cb_hook_client_pre_frame(void *data EINA_UNUSED, E_Client *ec) if (ec->visible) { - if (ec->wl_comp_data->set_win_type) + if (ec->comp_data->set_win_type) { int type = ECORE_WL_WINDOW_TYPE_TOPLEVEL; @@ -3092,7 +3090,7 @@ _e_comp_wl_cb_hook_client_pre_frame(void *data EINA_UNUSED, E_Client *ec) ecore_evas_wayland_type_set(ec->internal_ecore_evas, type); } - ec->wl_comp_data->set_win_type = EINA_FALSE; + ec->comp_data->set_win_type = EINA_FALSE; } } @@ -3108,17 +3106,17 @@ _e_comp_wl_cb_hook_client_pre_frame(void *data EINA_UNUSED, E_Client *ec) if (ec->visible) evas_object_show(ec->frame); - ec->wl_comp_data->need_reparent = EINA_FALSE; + ec->comp_data->need_reparent = EINA_FALSE; ec->redirected = EINA_TRUE; - if (ec->wl_comp_data->change_icon) + if (ec->comp_data->change_icon) { ec->changes.icon = EINA_TRUE; EC_CHANGED(ec); } - ec->wl_comp_data->change_icon = EINA_FALSE; - ec->wl_comp_data->reparented = EINA_TRUE; + ec->comp_data->change_icon = EINA_FALSE; + ec->comp_data->reparented = EINA_TRUE; /* _e_comp_wl_evas_cb_comp_hidden(ec, NULL, NULL); */ } @@ -3187,14 +3185,14 @@ _e_comp_wl_cb_hook_client_eval_end(void *data EINA_UNUSED, E_Client *ec) static void _e_comp_wl_cb_hook_client_focus_set(void *data EINA_UNUSED, E_Client *ec) { - if ((!ec) || (!ec->wl_comp_data)) return; + if ((!ec) || (!ec->comp_data)) return; // E_COMP_WL_PIXMAP_CHECK; - if (ec->wl_comp_data->shell.activate) + if (ec->comp_data->shell.activate) { - if (ec->wl_comp_data->shell.surface) - ec->wl_comp_data->shell.activate(ec->wl_comp_data->shell.surface); + if (ec->comp_data->shell.surface) + ec->comp_data->shell.activate(ec->comp_data->shell.surface); } /* FIXME: This seems COMPLETELY wrong !! (taken from e_comp_x) @@ -3217,9 +3215,9 @@ _e_comp_wl_cb_hook_client_focus_set(void *data EINA_UNUSED, E_Client *ec) else if (!ec->icccm.take_focus) e_grabinput_focus(e_client_util_win_get(ec), E_FOCUS_METHOD_PASSIVE); - if (ec->comp->wl_comp_data->kbd.focus != ec->wl_comp_data->surface) + if (ec->comp->wl_comp_data->kbd.focus != ec->comp_data->surface) { - ec->comp->wl_comp_data->kbd.focus = ec->wl_comp_data->surface; + ec->comp->wl_comp_data->kbd.focus = ec->comp_data->surface; e_comp_wl_data_device_keyboard_focus_set(ec->comp->wl_comp_data); } } @@ -3227,19 +3225,19 @@ _e_comp_wl_cb_hook_client_focus_set(void *data EINA_UNUSED, E_Client *ec) static void _e_comp_wl_cb_hook_client_focus_unset(void *data EINA_UNUSED, E_Client *ec) { - if ((!ec) || (!ec->wl_comp_data)) return; + if ((!ec) || (!ec->comp_data)) return; E_COMP_WL_PIXMAP_CHECK; - if (ec->wl_comp_data->shell.deactivate) + if (ec->comp_data->shell.deactivate) { - if (ec->wl_comp_data->shell.surface) - ec->wl_comp_data->shell.deactivate(ec->wl_comp_data->shell.surface); + if (ec->comp_data->shell.surface) + ec->comp_data->shell.deactivate(ec->comp_data->shell.surface); } _e_comp_wl_focus_check(ec->comp); - if (ec->comp->wl_comp_data->kbd.focus == ec->wl_comp_data->surface) + if (ec->comp->wl_comp_data->kbd.focus == ec->comp_data->surface) ec->comp->wl_comp_data->kbd.focus = NULL; } diff --git a/src/bin/e_comp_wl.h b/src/bin/e_comp_wl.h index ce8c219e0..f75151cf3 100644 --- a/src/bin/e_comp_wl.h +++ b/src/bin/e_comp_wl.h @@ -1,4 +1,5 @@ #ifdef E_TYPEDEFS + #else # ifndef E_COMP_WL_H # define E_COMP_WL_H @@ -37,6 +38,57 @@ typedef struct _E_Comp_Wl_Buffer E_Comp_Wl_Buffer; typedef struct _E_Comp_Wl_Buffer_Ref E_Comp_Wl_Buffer_Ref; typedef struct _E_Comp_Wl_Subsurf E_Comp_Wl_Subsurf; +typedef struct _E_Comp_Wl_Client_Data E_Comp_Wl_Client_Data; +typedef struct _E_Comp_Wl_Data E_Comp_Wl_Data; + +struct _E_Comp_Wl_Buffer +{ + struct wl_resource *resource; + struct wl_signal destroy_signal; + struct wl_listener destroy_listener; + union + { + struct wl_shm_buffer *shm_buffer; + void *legacy_buffer; + }; + int32_t w, h; + uint32_t busy; +}; + +struct _E_Comp_Wl_Buffer_Ref +{ + E_Comp_Wl_Buffer *buffer; + struct wl_listener destroy_listener; +}; + +struct _E_Comp_Wl_Subsurf +{ + struct wl_resource *resource; + + E_Client *parent; + + struct + { + int x, y; + Eina_Bool set; + } position; + + struct + { + int x, y; + + Eina_Bool has_data; + Eina_Bool new_attach; + + E_Comp_Wl_Buffer_Ref buffer_ref; + + Eina_Tiler *damage; + Eina_Tiler *opaque; + Eina_Tiler *input; + } cached; + + Eina_Bool synchronized; +}; struct _E_Comp_Wl_Data { @@ -151,55 +203,6 @@ struct _E_Comp_Wl_Data Eina_Bool restack : 1; }; -struct _E_Comp_Wl_Buffer -{ - struct wl_resource *resource; - struct wl_signal destroy_signal; - struct wl_listener destroy_listener; - union - { - struct wl_shm_buffer *shm_buffer; - void *legacy_buffer; - }; - int32_t w, h; - uint32_t busy; -}; - -struct _E_Comp_Wl_Buffer_Ref -{ - E_Comp_Wl_Buffer *buffer; - struct wl_listener destroy_listener; -}; - -struct _E_Comp_Wl_Subsurf -{ - struct wl_resource *resource; - - E_Client *parent; - - struct - { - int x, y; - Eina_Bool set; - } position; - - struct - { - int x, y; - - Eina_Bool has_data; - Eina_Bool new_attach; - - E_Comp_Wl_Buffer_Ref buffer_ref; - - Eina_Tiler *damage; - Eina_Tiler *opaque; - Eina_Tiler *input; - } cached; - - Eina_Bool synchronized; -}; - struct _E_Comp_Wl_Client_Data { Ecore_Timer *first_draw_tmr; diff --git a/src/bin/e_comp_wl_data.c b/src/bin/e_comp_wl_data.c index 7483a59c5..4db5da010 100644 --- a/src/bin/e_comp_wl_data.c +++ b/src/bin/e_comp_wl_data.c @@ -1,6 +1,5 @@ +#define E_COMP_WL #include "e.h" -#include "e_comp_wl.h" -#include "e_comp_wl_data.h" static struct wl_resource * _e_comp_wl_data_find_for_client(Eina_List *list, struct wl_client *client) @@ -153,14 +152,14 @@ static const struct wl_data_source_interface _e_data_source_interface = static void _e_comp_wl_data_device_destroy_selection_data_source(struct wl_listener *listener, void *data) { - E_Comp_Wl_Data *cdata; + E_Comp_Data *cdata; E_Comp_Wl_Data_Source *source; struct wl_resource *data_device_res, *focus = NULL; if (!(source = (E_Comp_Wl_Data_Source*)data)) return; - if (!(cdata = container_of(listener, E_Comp_Wl_Data, + if (!(cdata = container_of(listener, E_Comp_Data, selection.data_source_listener))) return; @@ -216,7 +215,7 @@ _e_comp_wl_data_device_data_offer_create(E_Comp_Wl_Data_Source *source, struct w } static void -_e_comp_wl_data_device_selection_set(E_Comp_Wl_Data *cdata, E_Comp_Wl_Data_Source *source, uint32_t serial) +_e_comp_wl_data_device_selection_set(E_Comp_Data *cdata, E_Comp_Wl_Data_Source *source, uint32_t serial) { E_Comp_Wl_Data_Source *sel_source; struct wl_resource *offer_res, *data_device_res, *focus = NULL; @@ -289,7 +288,7 @@ _e_comp_wl_data_device_cb_drag_start(struct wl_client *client EINA_UNUSED, struc static void _e_comp_wl_data_device_cb_selection_set(struct wl_client *client EINA_UNUSED, struct wl_resource *resource EINA_UNUSED, struct wl_resource *source_resource, uint32_t serial) { - E_Comp_Wl_Data *cdata; + E_Comp_Data *cdata; E_Comp_Wl_Data_Source *source; if (!source_resource) return; @@ -308,7 +307,7 @@ static const struct wl_data_device_interface _e_data_device_interface = static void _e_comp_wl_data_device_cb_unbind(struct wl_resource *resource) { - E_Comp_Wl_Data *cdata; + E_Comp_Data *cdata; if(!(cdata = wl_resource_get_user_data(resource))) return; @@ -352,7 +351,7 @@ _e_comp_wl_data_manager_cb_source_create(struct wl_client *client EINA_UNUSED, s static void _e_comp_wl_data_manager_cb_device_get(struct wl_client *client, struct wl_resource *manager_resource, uint32_t id, struct wl_resource *seat_resource) { - E_Comp_Wl_Data *cdata; + E_Comp_Data *cdata; struct wl_resource *res; DBG("Comp_Wl_Data: Get Data Device"); @@ -384,7 +383,7 @@ static const struct wl_data_device_manager_interface _e_manager_interface = /* static void */ /* _e_comp_wl_data_cb_unbind_manager(struct wl_resource *resource) */ /* { */ -/* E_Comp_Wl_Data *cdata; */ +/* E_Comp_Data *cdata; */ /* DBG("Comp_Wl_Data: Unbind Manager"); */ @@ -396,7 +395,7 @@ static const struct wl_data_device_manager_interface _e_manager_interface = static void _e_comp_wl_data_cb_bind_manager(struct wl_client *client, void *data, uint32_t version EINA_UNUSED, uint32_t id) { - E_Comp_Wl_Data *cdata; + E_Comp_Data *cdata; struct wl_resource *res; if (!(cdata = data)) return; @@ -486,13 +485,12 @@ _e_comp_wl_clipboard_offer_create(E_Comp_Wl_Clipboard_Source* source, int fd) static Eina_Bool _e_comp_wl_clipboard_source_save(void *data, Ecore_Fd_Handler *handler) { - E_Comp_Wl_Data *cdata; + E_Comp_Data *cdata; E_Comp_Wl_Clipboard_Source *source; char *p; int len, size; - if (!(cdata = (E_Comp_Wl_Data*)data)) - return ECORE_CALLBACK_CANCEL; + if (!(cdata = data)) return ECORE_CALLBACK_CANCEL; if (!(source = (E_Comp_Wl_Clipboard_Source*)cdata->clipboard.source)) return ECORE_CALLBACK_CANCEL; @@ -555,7 +553,7 @@ _e_comp_wl_clipboard_source_cancelled_send(E_Comp_Wl_Data_Source *source EINA_UN } static E_Comp_Wl_Clipboard_Source* -_e_comp_wl_clipboard_source_create(E_Comp_Wl_Data *cdata, const char *mime_type, uint32_t serial, int fd) +_e_comp_wl_clipboard_source_create(E_Comp_Data *cdata, const char *mime_type, uint32_t serial, int fd) { E_Comp_Wl_Clipboard_Source *source; @@ -591,13 +589,13 @@ _e_comp_wl_clipboard_source_create(E_Comp_Wl_Data *cdata, const char *mime_type, static void _e_comp_wl_clipboard_selection_set(struct wl_listener *listener EINA_UNUSED, void *data) { - E_Comp_Wl_Data *cdata; + E_Comp_Data *cdata; E_Comp_Wl_Data_Source *sel_source; E_Comp_Wl_Clipboard_Source *clip_source; int p[2]; char *mime_type; - if (!(cdata = (E_Comp_Wl_Data*)data)) return; + if (!(cdata = data)) return; sel_source = (E_Comp_Wl_Data_Source*) cdata->selection.data_source; clip_source = (E_Comp_Wl_Clipboard_Source*) cdata->clipboard.source; @@ -636,7 +634,7 @@ _e_comp_wl_clipboard_selection_set(struct wl_listener *listener EINA_UNUSED, voi } static void -_e_comp_wl_clipboard_destroy(E_Comp_Wl_Data *cdata) +_e_comp_wl_clipboard_destroy(E_Comp_Data *cdata) { if (!cdata) return; @@ -644,7 +642,7 @@ _e_comp_wl_clipboard_destroy(E_Comp_Wl_Data *cdata) } static void -_e_comp_wl_clipboard_create(E_Comp_Wl_Data *cdata) +_e_comp_wl_clipboard_create(E_Comp_Data *cdata) { if (!cdata) return; @@ -653,7 +651,7 @@ _e_comp_wl_clipboard_create(E_Comp_Wl_Data *cdata) } EINTERN void -e_comp_wl_data_device_keyboard_focus_set(E_Comp_Wl_Data *cdata) +e_comp_wl_data_device_keyboard_focus_set(E_Comp_Data *cdata) { struct wl_resource *data_device_res, *offer_res, *focus; E_Comp_Wl_Data_Source *source; @@ -678,7 +676,7 @@ e_comp_wl_data_device_keyboard_focus_set(E_Comp_Wl_Data *cdata) } EINTERN Eina_Bool -e_comp_wl_data_manager_init(E_Comp_Wl_Data *cdata) +e_comp_wl_data_manager_init(E_Comp_Data *cdata) { /* check for valid compositor data */ if (!cdata) return EINA_FALSE; @@ -702,7 +700,7 @@ e_comp_wl_data_manager_init(E_Comp_Wl_Data *cdata) } EINTERN void -e_comp_wl_data_manager_shutdown(E_Comp_Wl_Data *cdata EINA_UNUSED) +e_comp_wl_data_manager_shutdown(E_Comp_Data *cdata) { /* destroy the global manager resource */ /* if (cdata->mgr.global) wl_global_destroy(cdata->mgr.global); */ diff --git a/src/bin/e_comp_wl_data.h b/src/bin/e_comp_wl_data.h index 3a19d44db..6e3df1153 100644 --- a/src/bin/e_comp_wl_data.h +++ b/src/bin/e_comp_wl_data.h @@ -3,13 +3,16 @@ # ifndef E_COMP_WL_DATA_H # define E_COMP_WL_DATA_H +# undef NEED_X +# include "e_comp_wl.h" + +# define CLIPBOARD_CHUNK 1024 + typedef struct _E_Comp_Wl_Data_Source E_Comp_Wl_Data_Source; typedef struct _E_Comp_Wl_Data_Offer E_Comp_Wl_Data_Offer; typedef struct _E_Comp_Wl_Clipboard_Source E_Comp_Wl_Clipboard_Source; typedef struct _E_Comp_Wl_Clipboard_Offer E_Comp_Wl_Clipboard_Offer; -#define CLIPBOARD_CHUNK 1024 - struct _E_Comp_Wl_Data_Source { struct wl_resource *resource; //resource of wl_data_source @@ -48,9 +51,9 @@ struct _E_Comp_Wl_Clipboard_Offer size_t offset; }; -EINTERN void e_comp_wl_data_device_keyboard_focus_set(E_Comp_Wl_Data *cdata); -EINTERN Eina_Bool e_comp_wl_data_manager_init(E_Comp_Wl_Data *cdata); -EINTERN void e_comp_wl_data_manager_shutdown(E_Comp_Wl_Data *cdata); +EINTERN void e_comp_wl_data_device_keyboard_focus_set(E_Comp_Data *cdata); +EINTERN Eina_Bool e_comp_wl_data_manager_init(E_Comp_Data *cdata); +EINTERN void e_comp_wl_data_manager_shutdown(E_Comp_Data *cdata); # endif #endif diff --git a/src/bin/e_comp_wl_input.c b/src/bin/e_comp_wl_input.c index df21e1450..a0463236e 100644 --- a/src/bin/e_comp_wl_input.c +++ b/src/bin/e_comp_wl_input.c @@ -1,10 +1,9 @@ +#define E_COMP_WL #include "e.h" -#include "e_comp_wl.h" -#include "e_comp_wl_input.h" #include static void -_e_comp_wl_input_update_seat_caps(E_Comp_Wl_Data *cdata) +_e_comp_wl_input_update_seat_caps(E_Comp_Data *cdata) { Eina_List *l; struct wl_resource *res; @@ -32,7 +31,7 @@ _e_comp_wl_input_cb_resource_destroy(struct wl_client *client EINA_UNUSED, struc static void _e_comp_wl_input_pointer_cb_cursor_set(struct wl_client *client EINA_UNUSED, struct wl_resource *resource EINA_UNUSED, uint32_t serial EINA_UNUSED, struct wl_resource *surface_resource EINA_UNUSED, int32_t x EINA_UNUSED, int32_t y EINA_UNUSED) { - E_Comp_Wl_Data *cdata; + E_Comp_Data *cdata; /* get compositor data */ if (!(cdata = wl_resource_get_user_data(resource))) return; @@ -52,7 +51,7 @@ static const struct wl_keyboard_interface _e_keyboard_interface = static void _e_comp_wl_input_cb_pointer_unbind(struct wl_resource *resource) { - E_Comp_Wl_Data *cdata; + E_Comp_Data *cdata; /* get compositor data */ if (!(cdata = wl_resource_get_user_data(resource))) return; @@ -63,7 +62,7 @@ _e_comp_wl_input_cb_pointer_unbind(struct wl_resource *resource) static void _e_comp_wl_input_cb_pointer_get(struct wl_client *client, struct wl_resource *resource, uint32_t id) { - E_Comp_Wl_Data *cdata; + E_Comp_Data *cdata; struct wl_resource *res; /* get compositor data */ @@ -87,7 +86,7 @@ _e_comp_wl_input_cb_pointer_get(struct wl_client *client, struct wl_resource *re static void _e_comp_wl_input_cb_keyboard_unbind(struct wl_resource *resource) { - E_Comp_Wl_Data *cdata; + E_Comp_Data *cdata; /* get compositor data */ if (!(cdata = wl_resource_get_user_data(resource))) return; @@ -98,7 +97,7 @@ _e_comp_wl_input_cb_keyboard_unbind(struct wl_resource *resource) static void _e_comp_wl_input_cb_keyboard_get(struct wl_client *client, struct wl_resource *resource, uint32_t id) { - E_Comp_Wl_Data *cdata; + E_Comp_Data *cdata; struct wl_resource *res; /* get compositor data */ @@ -126,7 +125,7 @@ _e_comp_wl_input_cb_keyboard_get(struct wl_client *client, struct wl_resource *r static void _e_comp_wl_input_cb_touch_get(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, uint32_t id EINA_UNUSED) { - E_Comp_Wl_Data *cdata; + E_Comp_Data *cdata; /* DBG("Input Touch Get"); */ @@ -146,7 +145,7 @@ static const struct wl_seat_interface _e_seat_interface = static void _e_comp_wl_input_cb_unbind_seat(struct wl_resource *resource) { - E_Comp_Wl_Data *cdata; + E_Comp_Data *cdata; if (!(cdata = wl_resource_get_user_data(resource))) return; @@ -156,7 +155,7 @@ _e_comp_wl_input_cb_unbind_seat(struct wl_resource *resource) static void _e_comp_wl_input_cb_bind_seat(struct wl_client *client, void *data, uint32_t version, uint32_t id) { - E_Comp_Wl_Data *cdata; + E_Comp_Data *cdata; struct wl_resource *res; if (!(cdata = data)) return; @@ -218,7 +217,7 @@ _e_comp_wl_input_keymap_fd_get(off_t size) } static void -_e_comp_wl_input_keymap_update(E_Comp_Wl_Data *cdata, struct xkb_keymap *keymap) +_e_comp_wl_input_keymap_update(E_Comp_Data *cdata, struct xkb_keymap *keymap) { char *tmp; xkb_mod_mask_t latched, locked; @@ -303,7 +302,7 @@ _e_comp_wl_input_keymap_update(E_Comp_Wl_Data *cdata, struct xkb_keymap *keymap) } EINTERN Eina_Bool -e_comp_wl_input_init(E_Comp_Wl_Data *cdata) +e_comp_wl_input_init(E_Comp_Data *cdata) { /* check for valid compositor data */ if (!cdata) return EINA_FALSE; @@ -327,7 +326,7 @@ e_comp_wl_input_init(E_Comp_Wl_Data *cdata) } EINTERN void -e_comp_wl_input_shutdown(E_Comp_Wl_Data *cdata) +e_comp_wl_input_shutdown(E_Comp_Data *cdata) { /* Eina_List *l; */ struct wl_resource *res; @@ -368,7 +367,7 @@ e_comp_wl_input_keyboard_check(struct wl_resource *res) } EINTERN void -e_comp_wl_input_keyboard_modifiers_update(E_Comp_Wl_Data *cdata) +e_comp_wl_input_keyboard_modifiers_update(E_Comp_Data *cdata) { xkb_mod_mask_t depressed, latched, locked; xkb_layout_index_t group; @@ -404,7 +403,7 @@ e_comp_wl_input_keyboard_modifiers_update(E_Comp_Wl_Data *cdata) } EINTERN void -e_comp_wl_input_keyboard_state_update(E_Comp_Wl_Data *cdata, uint32_t keycode, Eina_Bool pressed) +e_comp_wl_input_keyboard_state_update(E_Comp_Data *cdata, uint32_t keycode, Eina_Bool pressed) { enum xkb_key_direction dir; @@ -419,7 +418,7 @@ e_comp_wl_input_keyboard_state_update(E_Comp_Wl_Data *cdata, uint32_t keycode, E } EAPI void -e_comp_wl_input_pointer_enabled_set(E_Comp_Wl_Data *cdata, Eina_Bool enabled) +e_comp_wl_input_pointer_enabled_set(E_Comp_Data *cdata, Eina_Bool enabled) { /* check for valid compositor data */ if (!cdata) return; @@ -429,7 +428,7 @@ e_comp_wl_input_pointer_enabled_set(E_Comp_Wl_Data *cdata, Eina_Bool enabled) } EAPI void -e_comp_wl_input_keyboard_enabled_set(E_Comp_Wl_Data *cdata, Eina_Bool enabled) +e_comp_wl_input_keyboard_enabled_set(E_Comp_Data *cdata, Eina_Bool enabled) { /* check for valid compositor data */ if (!cdata) return; @@ -439,7 +438,7 @@ e_comp_wl_input_keyboard_enabled_set(E_Comp_Wl_Data *cdata, Eina_Bool enabled) } EAPI void -e_comp_wl_input_keymap_set(E_Comp_Wl_Data *cdata, const char *rules, const char *model, const char *layout) +e_comp_wl_input_keymap_set(E_Comp_Data *cdata, const char *rules, const char *model, const char *layout) { struct xkb_keymap *keymap; struct xkb_rule_names names; diff --git a/src/bin/e_comp_wl_input.h b/src/bin/e_comp_wl_input.h index 522b245cf..9c0000c9a 100644 --- a/src/bin/e_comp_wl_input.h +++ b/src/bin/e_comp_wl_input.h @@ -3,18 +3,18 @@ # ifndef E_COMP_WL_INPUT_H # define E_COMP_WL_INPUT_H -EINTERN Eina_Bool e_comp_wl_input_init(E_Comp_Wl_Data *cdata); -EINTERN void e_comp_wl_input_shutdown(E_Comp_Wl_Data *cdata); +EINTERN Eina_Bool e_comp_wl_input_init(E_Comp_Data *cdata); +EINTERN void e_comp_wl_input_shutdown(E_Comp_Data *cdata); EINTERN Eina_Bool e_comp_wl_input_pointer_check(struct wl_resource *res); EINTERN Eina_Bool e_comp_wl_input_keyboard_check(struct wl_resource *res); -EINTERN void e_comp_wl_input_keyboard_modifiers_update(E_Comp_Wl_Data *cdata); -EINTERN void e_comp_wl_input_keyboard_state_update(E_Comp_Wl_Data *cdata, uint32_t keycode, Eina_Bool pressed); +EINTERN void e_comp_wl_input_keyboard_modifiers_update(E_Comp_Data *cdata); +EINTERN void e_comp_wl_input_keyboard_state_update(E_Comp_Data *cdata, uint32_t keycode, Eina_Bool pressed); -EAPI void e_comp_wl_input_pointer_enabled_set(E_Comp_Wl_Data *cdata, Eina_Bool enabled); -EAPI void e_comp_wl_input_keyboard_enabled_set(E_Comp_Wl_Data *cdata, Eina_Bool enabled); +EAPI void e_comp_wl_input_pointer_enabled_set(E_Comp_Data *cdata, Eina_Bool enabled); +EAPI void e_comp_wl_input_keyboard_enabled_set(E_Comp_Data *cdata, Eina_Bool enabled); -EAPI void e_comp_wl_input_keymap_set(E_Comp_Wl_Data *cdata, const char *rules, const char *model, const char *layout); +EAPI void e_comp_wl_input_keymap_set(E_Comp_Data *cdata, const char *rules, const char *model, const char *layout); # endif #endif diff --git a/src/bin/e_comp_x.c b/src/bin/e_comp_x.c index 57b11966a..367be6dba 100644 --- a/src/bin/e_comp_x.c +++ b/src/bin/e_comp_x.c @@ -1,12 +1,12 @@ +#define E_COMP_X #include "e.h" -#include -# define RANDR_VERSION_1_3 ((1 << 16) | 3) -# define RANDR_VERSION_1_4 ((1 << 16) | 4) +#define RANDR_VERSION_1_3 ((1 << 16) | 3) +#define RANDR_VERSION_1_4 ((1 << 16) | 4) #define GRAV_SET(ec, grav) \ ecore_x_window_gravity_set(e_client_util_pwin_get(ec), grav); \ - if (ec->x_comp_data->lock_win) ecore_x_window_gravity_set(ec->x_comp_data->lock_win, grav); \ + if (ec->comp_data->lock_win) ecore_x_window_gravity_set(ec->comp_data->lock_win, grav); \ ecore_x_window_gravity_set(e_client_util_win_get(ec), grav); #define E_COMP_X_PIXMAP_CHECK if (e_pixmap_type_get(ec->pixmap) != E_PIXMAP_TYPE_X) return @@ -60,7 +60,7 @@ extern double e_bl_val; static inline Ecore_X_Window _e_comp_x_client_window_get(const E_Client *ec) { - if (ec->x_comp_data->reparented) + if (ec->comp_data->reparented) return e_client_util_pwin_get(ec); return e_client_util_win_get(ec); } @@ -70,10 +70,10 @@ _e_comp_x_client_damage_add(E_Client *ec) { Ecore_X_Window win; - if (ec->x_comp_data->damage) return; + if (ec->comp_data->damage) return; win = _e_comp_x_client_window_get(ec); - ec->x_comp_data->damage = ecore_x_damage_new(win, ECORE_X_DAMAGE_REPORT_DELTA_RECTANGLES); - eina_hash_add(damages_hash, &ec->x_comp_data->damage, ec); + ec->comp_data->damage = ecore_x_damage_new(win, ECORE_X_DAMAGE_REPORT_DELTA_RECTANGLES); + eina_hash_add(damages_hash, &ec->comp_data->damage, ec); } static void @@ -94,7 +94,7 @@ _e_comp_x_client_frame_update(E_Client *ec, int l, int r, int t, int b) { ecore_x_netwm_frame_size_set(e_client_util_win_get(ec), l, r, t, b); ecore_x_e_frame_size_set(e_client_util_win_get(ec), l, r, t, b); - ec->x_comp_data->frame_update = 0; + ec->comp_data->frame_update = 0; } static void @@ -120,7 +120,7 @@ _e_comp_x_print_win(Ecore_X_Window win) static void _e_comp_x_focus_setup(E_Client *ec) { - if (ec->x_comp_data->button_grabbed) return; + if (ec->comp_data->button_grabbed) return; if (!((e_client_focus_policy_click(ec)) || (e_config->always_click_to_raise) || (e_config->always_click_to_focus))) return; @@ -137,7 +137,7 @@ _e_comp_x_focus_setup(E_Client *ec) ECORE_X_EVENT_MASK_MOUSE_DOWN | ECORE_X_EVENT_MASK_MOUSE_UP | ECORE_X_EVENT_MASK_MOUSE_MOVE, 0, 1); - ec->x_comp_data->button_grabbed = 1; + ec->comp_data->button_grabbed = 1; } @@ -146,7 +146,7 @@ _e_comp_x_focus_setdown(E_Client *ec) { Ecore_X_Window win = e_client_util_pwin_get(ec); - if (!ec->x_comp_data->button_grabbed) return; + if (!ec->comp_data->button_grabbed) return; e_bindings_mouse_ungrab(E_BINDING_CONTEXT_WINDOW, win); e_bindings_wheel_ungrab(E_BINDING_CONTEXT_WINDOW, win); ecore_x_window_button_ungrab(win, 1, 0, 1); @@ -154,7 +154,7 @@ _e_comp_x_focus_setdown(E_Client *ec) ecore_x_window_button_ungrab(win, 3, 0, 1); e_bindings_mouse_grab(E_BINDING_CONTEXT_WINDOW, win); e_bindings_wheel_grab(E_BINDING_CONTEXT_WINDOW, win); - ec->x_comp_data->button_grabbed = 0; + ec->comp_data->button_grabbed = 0; } static Eina_Bool @@ -164,27 +164,27 @@ _e_comp_x_client_new_helper(E_Client *ec) int at_num = 0, i; Ecore_X_Atom *atoms; - if (!ecore_x_window_attributes_get(win, &ec->x_comp_data->initial_attributes)) + if (!ecore_x_window_attributes_get(win, &ec->comp_data->initial_attributes)) { //CRI("OUCH! FIX THIS!"); e_object_del(E_OBJECT(ec)); return EINA_FALSE; } - if (ec->re_manage && (!ec->x_comp_data->initial_attributes.visible)) + if (ec->re_manage && (!ec->comp_data->initial_attributes.visible)) { /* ain't gonna be no hidden clients on my watch! */ e_object_del(E_OBJECT(ec)); return EINA_FALSE; } - ec->depth = ec->x_comp_data->initial_attributes.depth; - ec->override = ec->x_comp_data->initial_attributes.override; + ec->depth = ec->comp_data->initial_attributes.depth; + ec->override = ec->comp_data->initial_attributes.override; ec->placed |= ec->override; - ec->input_only = ec->x_comp_data->initial_attributes.input_only; - ec->border_size = ec->x_comp_data->initial_attributes.border; + ec->input_only = ec->comp_data->initial_attributes.input_only; + ec->border_size = ec->comp_data->initial_attributes.border; ec->icccm.accepts_focus = (!ec->override) && (!ec->input_only); - //INF("NEW CLIENT: %d,%d -> %d,%d", ec->x, ec->y, ec->x_comp_data->initial_attributes.x, ec->x_comp_data->initial_attributes.y); - ec->x = ec->client.x = ec->x_comp_data->initial_attributes.x; - ec->y = ec->client.y = ec->x_comp_data->initial_attributes.y; + //INF("NEW CLIENT: %d,%d -> %d,%d", ec->x, ec->y, ec->comp_data->initial_attributes.x, ec->comp_data->initial_attributes.y); + ec->x = ec->client.x = ec->comp_data->initial_attributes.x; + ec->y = ec->client.y = ec->comp_data->initial_attributes.y; if (ec->override && ((ec->x == -77) && (ec->y == -777))) { /* this is the ecore-x private window :/ */ @@ -194,20 +194,20 @@ _e_comp_x_client_new_helper(E_Client *ec) } if ((!e_client_util_ignored_get(ec)) && (!ec->internal) && (!ec->internal_ecore_evas)) { - ec->x_comp_data->need_reparent = 1; + ec->comp_data->need_reparent = 1; EC_CHANGED(ec); ec->take_focus = !starting; } ec->new_client ^= ec->override; - ec->w = ec->client.w = ec->x_comp_data->initial_attributes.w; - ec->h = ec->client.h = ec->x_comp_data->initial_attributes.h; + ec->w = ec->client.w = ec->comp_data->initial_attributes.w; + ec->h = ec->client.h = ec->comp_data->initial_attributes.h; ec->changes.size = 1; if (ec->override) - ec->x_comp_data->pw = ec->w, ec->x_comp_data->ph = ec->h; + ec->comp_data->pw = ec->w, ec->comp_data->ph = ec->h; - e_pixmap_visual_cmap_set(ec->pixmap, ec->x_comp_data->initial_attributes.visual, ec->x_comp_data->initial_attributes.colormap); + e_pixmap_visual_cmap_set(ec->pixmap, ec->comp_data->initial_attributes.visual, ec->comp_data->initial_attributes.colormap); if (ec->override && (!ec->internal)) ecore_x_window_shape_events_select(win, 1); if (ec->override && (!(ec->comp_data->initial_attributes.event_mask.mine & ECORE_X_EVENT_MASK_WINDOW_PROPERTY))) @@ -320,23 +320,23 @@ _e_comp_x_client_new_helper(E_Client *ec) ec->vkbd.fetch.vkbd = 1; /* loop to check for illume atoms */ else if (atoms[i] == ECORE_X_ATOM_E_ILLUME_CONFORMANT) - ec->x_comp_data->illume.conformant.fetch.conformant = 1; + ec->comp_data->illume.conformant.fetch.conformant = 1; else if (atoms[i] == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE) - ec->x_comp_data->illume.quickpanel.fetch.state = 1; + ec->comp_data->illume.quickpanel.fetch.state = 1; else if (atoms[i] == ECORE_X_ATOM_E_ILLUME_QUICKPANEL) - ec->x_comp_data->illume.quickpanel.fetch.quickpanel = 1; + ec->comp_data->illume.quickpanel.fetch.quickpanel = 1; else if (atoms[i] == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MAJOR) - ec->x_comp_data->illume.quickpanel.fetch.priority.major = 1; + ec->comp_data->illume.quickpanel.fetch.priority.major = 1; else if (atoms[i] == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MINOR) - ec->x_comp_data->illume.quickpanel.fetch.priority.minor = 1; + ec->comp_data->illume.quickpanel.fetch.priority.minor = 1; else if (atoms[i] == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ZONE) - ec->x_comp_data->illume.quickpanel.fetch.zone = 1; + ec->comp_data->illume.quickpanel.fetch.zone = 1; else if (atoms[i] == ECORE_X_ATOM_E_ILLUME_DRAG_LOCKED) - ec->x_comp_data->illume.drag.fetch.locked = 1; + ec->comp_data->illume.drag.fetch.locked = 1; else if (atoms[i] == ECORE_X_ATOM_E_ILLUME_DRAG) - ec->x_comp_data->illume.drag.fetch.drag = 1; + ec->comp_data->illume.drag.fetch.drag = 1; else if (atoms[i] == ECORE_X_ATOM_E_ILLUME_WINDOW_STATE) - ec->x_comp_data->illume.win_state.fetch.state = 1; + ec->comp_data->illume.win_state.fetch.state = 1; else if (atoms[i] == ECORE_X_ATOM_E_VIDEO_PARENT) video_parent = EINA_TRUE; else if (atoms[i] == ECORE_X_ATOM_E_VIDEO_POSITION) @@ -474,7 +474,7 @@ _e_comp_x_post_client_idler_cb(void *d EINA_UNUSED) { Ecore_X_Window win, twin; - if (e_object_is_del(E_OBJECT(ec)) || (!ec->x_comp_data)) continue; + if (e_object_is_del(E_OBJECT(ec)) || (!ec->comp_data)) continue; win = _e_comp_x_client_window_get(ec); if (ec->post_move) { @@ -514,7 +514,7 @@ _e_comp_x_post_client_idler_cb(void *d EINA_UNUSED) ec->client.y, ec->client.w, ec->client.h); - if (ec->x_comp_data->reparented) + if (ec->comp_data->reparented) ecore_x_window_resize(e_client_util_win_get(ec), ec->client.w, ec->client.h); @@ -529,7 +529,7 @@ _e_comp_x_post_client_idler_cb(void *d EINA_UNUSED) //INF("X RSZ: %dx%d (REAL: %dx%d)", ec->client.w, ec->client.h, ec->w, ec->h); ecore_x_window_resize(win, ec->client.w, ec->client.h); - if (ec->x_comp_data->reparented) + if (ec->comp_data->reparented) ecore_x_window_resize(e_client_util_win_get(ec), ec->client.w, ec->client.h); } @@ -610,8 +610,8 @@ _e_comp_x_client_stack(E_Client *ec) if (ec->override && (!ec->internal)) return; //can't restack these if (e_client_is_stacking(ec)) return; - if (!ec->x_comp_data) return; - if (ec->x_comp_data->unredirected_single) return; + if (!ec->comp_data) return; + if (ec->comp_data->unredirected_single) return; ecore_x_window_shadow_tree_flush(); @@ -623,7 +623,7 @@ _e_comp_x_client_stack(E_Client *ec) if (ec2 && (e_client_is_stacking(ec2) || ((!ec2->override) || ec2->internal))) { if (ec2->layer != ec->layer) break; - if (ec2->x_comp_data->need_reparent && (!ec2->x_comp_data->reparented)) continue; + if (ec2->comp_data->need_reparent && (!ec2->comp_data->reparented)) continue; win = _e_comp_x_client_window_get(ec2); } } while (ec2 && (!win)); @@ -638,7 +638,7 @@ _e_comp_x_client_stack(E_Client *ec) if (ec2 && (e_client_is_stacking(ec2) || ((!ec2->override) || ec2->internal))) { if (ec2->layer != ec->layer) break; - if (ec2->x_comp_data->need_reparent && (!ec2->x_comp_data->reparented)) continue; + if (ec2->comp_data->need_reparent && (!ec2->comp_data->reparented)) continue; win = _e_comp_x_client_window_get(ec2); mode = ECORE_X_WINDOW_STACK_ABOVE; } @@ -705,7 +705,7 @@ _e_comp_x_client_shape_input_rectangle_set(E_Client *ec) { Ecore_X_Window win = e_client_util_pwin_get(ec); - if (ec->override || (!ec->x_comp_data->reparented)) return; + if (ec->override || (!ec->comp_data->reparented)) return; if (ec->visible && (!ec->comp_hidden)) ecore_x_composite_window_events_enable(win); @@ -719,7 +719,7 @@ _e_comp_x_evas_color_set_cb(void *data, Evas_Object *obj, void *event_info EINA_ E_Client *ec = data; int a; - if (!ec->x_comp_data) return; + if (!ec->comp_data) return; evas_object_color_get(obj, NULL, NULL, NULL, &a); if (a == ec->netwm.opacity) return; ec->netwm.opacity_changed = 1; @@ -731,7 +731,7 @@ _e_comp_x_evas_ping_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_inf { E_Client *ec = data; - if (!ec->x_comp_data) return; + if (!ec->comp_data) return; ecore_x_netwm_ping_send(e_client_util_win_get(ec)); } @@ -740,7 +740,7 @@ _e_comp_x_evas_kill_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_inf { E_Client *ec = data; - if (!ec->x_comp_data) return; + if (!ec->comp_data) return; ecore_x_kill(e_client_util_win_get(ec)); } @@ -749,7 +749,7 @@ _e_comp_x_evas_delete_request_cb(void *data, Evas_Object *obj EINA_UNUSED, void { E_Client *ec = data; - if (!ec->x_comp_data) return; + if (!ec->comp_data) return; if (ec->netwm.ping) e_client_ping(ec); ecore_x_window_delete_request_send(e_client_util_win_get(ec)); @@ -762,8 +762,8 @@ _e_comp_x_evas_comp_hidden_cb(void *data, Evas_Object *obj EINA_UNUSED, void *ev Eina_List *l; Ecore_X_Window win; - if (!ec->x_comp_data) return; - if (ec->x_comp_data->need_reparent) return; + if (!ec->comp_data) return; + if (ec->comp_data->need_reparent) return; win = _e_comp_x_client_window_get(ec); EINA_LIST_FOREACH(ec->e.state.video_child, l, tmp) @@ -791,7 +791,7 @@ _e_comp_x_evas_shade_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_in Eina_List *l; E_Client *tmp; - if (!ec->x_comp_data) return; + if (!ec->comp_data) return; EINA_LIST_FOREACH(ec->e.state.video_child, l, tmp) ecore_x_window_hide(e_client_util_pwin_get(tmp)); @@ -804,11 +804,11 @@ _e_comp_x_evas_frame_recalc_cb(void *data, Evas_Object *obj, void *event_info) E_Client *ec = data; E_Comp_Object_Frame *fr = event_info; - if (!ec->x_comp_data) return; + if (!ec->comp_data) return; if (evas_object_visible_get(obj)) _e_comp_x_client_frame_update(ec, fr->l, fr->r, fr->t, fr->b); else - ec->x_comp_data->frame_update = 1; + ec->comp_data->frame_update = 1; ec->post_move = ec->post_resize = 1; _e_comp_x_post_client_idler_add(ec); } @@ -818,11 +818,11 @@ _e_comp_x_evas_move_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UN { E_Client *ec = data; - if (!ec->x_comp_data) return; - if (ec->x_comp_data->moving && (!ec->x_comp_data->unredirected_single)) + if (!ec->comp_data) return; + if (ec->comp_data->moving && (!ec->comp_data->unredirected_single)) { - if (ec->x_comp_data->move_counter++ < MOVE_COUNTER_LIMIT) return; - ec->x_comp_data->move_counter = 0; + if (ec->comp_data->move_counter++ < MOVE_COUNTER_LIMIT) return; + ec->comp_data->move_counter = 0; } ecore_x_window_shadow_tree_flush(); @@ -835,7 +835,7 @@ _e_comp_x_evas_resize_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_i { E_Client *ec = data; - if (!ec->x_comp_data) return; + if (!ec->comp_data) return; if (ec->shading || ec->shaded) return; if (!e_pixmap_size_changed(ec->pixmap, ec->client.w, ec->client.h)) return; @@ -876,7 +876,7 @@ _e_comp_x_evas_hide_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UN unsigned int visible = 0; Eina_List *l; - if (!ec->x_comp_data) return; // already deleted, happens with internal wins + if (!ec->comp_data) return; // already deleted, happens with internal wins ecore_x_window_shadow_tree_flush(); if ((!ec->iconic) && (!ec->override)) ecore_x_window_prop_card32_set(e_client_util_win_get(ec), E_ATOM_MAPPED, &visible, 1); @@ -901,10 +901,10 @@ _e_comp_x_evas_show_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UN Ecore_X_Window win; Eina_List *l; - if (!ec->x_comp_data) return; + if (!ec->comp_data) return; win = e_client_util_win_get(ec); ecore_x_window_shadow_tree_flush(); - if (!ec->x_comp_data->need_reparent) + if (!ec->comp_data->need_reparent) ecore_x_window_show(win); if (ec->unredirected_single) ecore_x_window_show(_e_comp_x_client_window_get(ec)); @@ -914,7 +914,7 @@ _e_comp_x_evas_show_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UN ecore_x_window_prop_card32_set(win, E_ATOM_MAPPED, &visible, 1); ecore_x_window_prop_card32_set(win, E_ATOM_MANAGED, &visible, 1); - if (ec->x_comp_data->frame_update) + if (ec->comp_data->frame_update) { int ll, r, t, b; @@ -1025,13 +1025,13 @@ _e_comp_x_destroy(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_Wi } return ECORE_CALLBACK_PASS_ON; } - if (ec->x_comp_data) + if (ec->comp_data) { - if (ec->x_comp_data->reparented) + if (ec->comp_data->reparented) e_client_comp_hidden_set(ec, 1); evas_object_pass_events_set(ec->frame, 1); evas_object_hide(ec->frame); - ec->x_comp_data->deleted = 1; + ec->comp_data->deleted = 1; e_object_del(E_OBJECT(ec)); } return ECORE_CALLBACK_PASS_ON; @@ -1069,8 +1069,8 @@ _e_comp_x_resize_request(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_E static void _e_comp_x_client_evas_init(E_Client *ec) { - if (ec->x_comp_data->evas_init) return; - ec->x_comp_data->evas_init = 1; + if (ec->comp_data->evas_init) return; + ec->comp_data->evas_init = 1; evas_object_event_callback_add(ec->frame, EVAS_CALLBACK_RESTACK, _e_comp_x_evas_stack_cb, ec); evas_object_event_callback_add(ec->frame, EVAS_CALLBACK_SHOW, _e_comp_x_evas_show_cb, ec); evas_object_event_callback_add(ec->frame, EVAS_CALLBACK_HIDE, _e_comp_x_evas_hide_cb, ec); @@ -1128,10 +1128,10 @@ _e_comp_x_show_request(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Eve return ECORE_CALLBACK_RENEW; } - if ((!ec->x_comp_data->reparented) && (!e_client_util_ignored_get(ec))) + if ((!ec->comp_data->reparented) && (!e_client_util_ignored_get(ec))) { if (!ec->override) - ec->x_comp_data->need_reparent = 1; + ec->comp_data->need_reparent = 1; ec->visible = 1; EC_CHANGED(ec); return ECORE_CALLBACK_RENEW; @@ -1154,11 +1154,11 @@ _e_comp_x_show_request(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Eve static void _e_comp_x_show_helper(E_Client *ec) { - if ((!ec->override) && (!ec->re_manage) && (!ec->x_comp_data->first_map) && - (!ec->x_comp_data->reparented) && (!ec->x_comp_data->need_reparent)) + if ((!ec->override) && (!ec->re_manage) && (!ec->comp_data->first_map) && + (!ec->comp_data->reparented) && (!ec->comp_data->need_reparent)) { /* this is most likely an internal window */ - ec->x_comp_data->need_reparent = 1; + ec->comp_data->need_reparent = 1; ec->visible = 1; if (ec->internal_ecore_evas) ec->take_focus = 1; @@ -1169,12 +1169,12 @@ _e_comp_x_show_helper(E_Client *ec) ec->redirected = !ec->input_only; ec->changes.visible = ec->visible = 1; EC_CHANGED(ec); - if (!ec->x_comp_data->first_map) + if (!ec->comp_data->first_map) _e_comp_x_client_evas_init(ec); } if (!ec->input_only) _e_comp_x_client_damage_add(ec); - if (!ec->x_comp_data->need_reparent) + if (!ec->comp_data->need_reparent) { e_pixmap_usable_set(ec->pixmap, 1); if (ec->hidden || ec->iconic) @@ -1184,7 +1184,7 @@ _e_comp_x_show_helper(E_Client *ec) } else evas_object_show(ec->frame); - ec->x_comp_data->first_map = 1; + ec->comp_data->first_map = 1; if (ec->internal_ecore_evas) { _e_comp_x_post_client_idler_add(ec); @@ -1393,7 +1393,7 @@ _e_comp_x_configure(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_ evas_object_move(ec->frame, ev->x, ev->y); if (resize) { - ec->x_comp_data->pw = ev->w, ec->x_comp_data->ph = ev->h; + ec->comp_data->pw = ev->w, ec->comp_data->ph = ev->h; e_pixmap_dirty(ec->pixmap); evas_object_resize(ec->frame, ev->w, ev->h); } @@ -1412,12 +1412,12 @@ _e_comp_x_configure_request(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore ec = _e_comp_x_client_find_by_window(ev->win); /* pass through requests for windows we haven't/won't reparent yet */ - if (ec && (!ec->x_comp_data->need_reparent) && (!ec->x_comp_data->reparented)) + if (ec && (!ec->comp_data->need_reparent) && (!ec->comp_data->reparented)) { - ec->x_comp_data->initial_attributes.x = ev->x; - ec->x_comp_data->initial_attributes.y = ev->y; - ec->w = ec->client.w = ec->x_comp_data->initial_attributes.w = ev->w; - ec->h = ec->client.h = ec->x_comp_data->initial_attributes.h = ev->h; + ec->comp_data->initial_attributes.x = ev->x; + ec->comp_data->initial_attributes.y = ev->y; + ec->w = ec->client.w = ec->comp_data->initial_attributes.w = ev->w; + ec->h = ec->client.h = ec->comp_data->initial_attributes.h = ev->h; ec->border_size = ev->border; ec->changes.size = 1; ec = NULL; @@ -1443,7 +1443,7 @@ _e_comp_x_configure_request(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore e_zone_useful_geometry_get(ec->zone, &zx, &zy, &zw, &zh); if (ev->value_mask & ECORE_X_WINDOW_CONFIGURE_MASK_X) { - ec->x_comp_data->initial_attributes.x = ev->x; + ec->comp_data->initial_attributes.x = ev->x; if (e_config->screen_limits == E_SCREEN_LIMITS_WITHIN) x = E_CLAMP(ev->x, zx, zx + zw - ec->w); else @@ -1451,7 +1451,7 @@ _e_comp_x_configure_request(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore } if (ev->value_mask & ECORE_X_WINDOW_CONFIGURE_MASK_Y) { - ec->x_comp_data->initial_attributes.y = ev->y; + ec->comp_data->initial_attributes.y = ev->y; if (e_config->screen_limits == E_SCREEN_LIMITS_WITHIN) y = E_CLAMP(ev->y, zy, zy + zh - ec->h); else @@ -1463,9 +1463,9 @@ _e_comp_x_configure_request(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore (ev->value_mask & ECORE_X_WINDOW_CONFIGURE_MASK_H)) { if (ev->value_mask & ECORE_X_WINDOW_CONFIGURE_MASK_W) - w = ev->w, ec->x_comp_data->initial_attributes.w = ev->w; + w = ev->w, ec->comp_data->initial_attributes.w = ev->w; if (ev->value_mask & ECORE_X_WINDOW_CONFIGURE_MASK_H) - h = ev->h, ec->x_comp_data->initial_attributes.h = ev->h; + h = ev->h, ec->comp_data->initial_attributes.h = ev->h; } e_comp_object_frame_wh_adjust(ec->frame, w, h, &w, &h); @@ -1686,8 +1686,8 @@ _e_comp_x_property(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_W } else if (ev->atom == ECORE_X_ATOM_WM_NORMAL_HINTS) { - if (ec->x_comp_data->internal_props_set) - ec->x_comp_data->internal_props_set--; + if (ec->comp_data->internal_props_set) + ec->comp_data->internal_props_set--; else { ec->icccm.fetch.size_pos_hints = 1; @@ -1749,47 +1749,47 @@ _e_comp_x_property(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_W } else if (ev->atom == ECORE_X_ATOM_E_ILLUME_CONFORMANT) { - ec->x_comp_data->illume.conformant.fetch.conformant = 1; + ec->comp_data->illume.conformant.fetch.conformant = 1; EC_CHANGED(ec); } else if (ev->atom == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE) { - ec->x_comp_data->illume.quickpanel.fetch.state = 1; + ec->comp_data->illume.quickpanel.fetch.state = 1; EC_CHANGED(ec); } else if (ev->atom == ECORE_X_ATOM_E_ILLUME_QUICKPANEL) { - ec->x_comp_data->illume.quickpanel.fetch.quickpanel = 1; + ec->comp_data->illume.quickpanel.fetch.quickpanel = 1; EC_CHANGED(ec); } else if (ev->atom == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MAJOR) { - ec->x_comp_data->illume.quickpanel.fetch.priority.major = 1; + ec->comp_data->illume.quickpanel.fetch.priority.major = 1; EC_CHANGED(ec); } else if (ev->atom == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MINOR) { - ec->x_comp_data->illume.quickpanel.fetch.priority.minor = 1; + ec->comp_data->illume.quickpanel.fetch.priority.minor = 1; EC_CHANGED(ec); } else if (ev->atom == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ZONE) { - ec->x_comp_data->illume.quickpanel.fetch.zone = 1; + ec->comp_data->illume.quickpanel.fetch.zone = 1; EC_CHANGED(ec); } else if (ev->atom == ECORE_X_ATOM_E_ILLUME_DRAG_LOCKED) { - ec->x_comp_data->illume.drag.fetch.locked = 1; + ec->comp_data->illume.drag.fetch.locked = 1; EC_CHANGED(ec); } else if (ev->atom == ECORE_X_ATOM_E_ILLUME_DRAG) { - ec->x_comp_data->illume.drag.fetch.drag = 1; + ec->comp_data->illume.drag.fetch.drag = 1; EC_CHANGED(ec); } else if (ev->atom == ECORE_X_ATOM_E_ILLUME_WINDOW_STATE) { - ec->x_comp_data->illume.win_state.fetch.state = 1; + ec->comp_data->illume.win_state.fetch.state = 1; EC_CHANGED(ec); } /* @@ -1972,7 +1972,7 @@ _e_comp_x_mapping_change(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_E if (e_pixmap_type_get(ec->pixmap) != E_PIXMAP_TYPE_X) continue; win = e_client_util_pwin_get(ec); - if ((!ec->x_comp_data->first_map) || (!ec->x_comp_data->reparented)) continue; + if ((!ec->comp_data->first_map) || (!ec->comp_data->reparented)) continue; _e_comp_x_focus_setdown(ec); e_bindings_mouse_ungrab(E_BINDING_CONTEXT_WINDOW, win); e_bindings_wheel_ungrab(E_BINDING_CONTEXT_WINDOW, win); @@ -1991,7 +1991,7 @@ _e_comp_x_mouse_in(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_M ec = _e_comp_x_client_find_by_window(ev->win); if (!ec) return ECORE_CALLBACK_RENEW; - if (ec->x_comp_data->deleted) return ECORE_CALLBACK_RENEW; + if (ec->comp_data->deleted) return ECORE_CALLBACK_RENEW; if (ec->input_object) return ECORE_CALLBACK_RENEW; e_client_mouse_in(ec, e_comp_canvas_x_root_adjust(ec->comp, ev->root.x), e_comp_canvas_x_root_adjust(ec->comp, ev->root.y)); return ECORE_CALLBACK_RENEW; @@ -2012,7 +2012,7 @@ _e_comp_x_mouse_out(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_ return ECORE_CALLBACK_PASS_ON; ec = _e_comp_x_client_find_by_window(ev->win); if (!ec) return ECORE_CALLBACK_RENEW; - if (ec->x_comp_data->deleted) return ECORE_CALLBACK_RENEW; + if (ec->comp_data->deleted) return ECORE_CALLBACK_RENEW; if (ec->input_object) return ECORE_CALLBACK_RENEW; e_client_mouse_out(ec, e_comp_canvas_x_root_adjust(ec->comp, ev->root.x), e_comp_canvas_x_root_adjust(ec->comp, ev->root.y)); return ECORE_CALLBACK_RENEW; @@ -2031,7 +2031,7 @@ _e_comp_x_mouse_wheel(void *d EINA_UNUSED, int t EINA_UNUSED, Ecore_Event_Mouse_ ec = _e_comp_x_client_find_by_window(ev->window); if (!ec) return ECORE_CALLBACK_RENEW; } - if (ec->x_comp_data->deleted) return ECORE_CALLBACK_RENEW; + if (ec->comp_data->deleted) return ECORE_CALLBACK_RENEW; e_bindings_ecore_event_mouse_wheel_convert(ev, &ev2); e_client_mouse_wheel(ec, (Evas_Point*)&ev->root, &ev2); return ECORE_CALLBACK_RENEW; @@ -2057,7 +2057,7 @@ _e_comp_x_mouse_up(void *d EINA_UNUSED, int t EINA_UNUSED, Ecore_Event_Mouse_But } if ((!ec) || e_client_util_ignored_get(ec)) return ECORE_CALLBACK_RENEW; } - if (ec->x_comp_data->deleted) return ECORE_CALLBACK_RENEW; + if (ec->comp_data->deleted) return ECORE_CALLBACK_RENEW; e_bindings_ecore_event_mouse_button_convert(ev, &ev2); e_client_mouse_up(ec, ev->buttons, (Evas_Point*)&ev->root, &ev2); return ECORE_CALLBACK_RENEW; @@ -2077,7 +2077,7 @@ _e_comp_x_mouse_down(void *d EINA_UNUSED, int t EINA_UNUSED, Ecore_Event_Mouse_B ec = _e_comp_x_client_find_by_window(ev->window); if ((!ec) || e_client_util_ignored_get(ec)) return ECORE_CALLBACK_RENEW; } - if (ec->x_comp_data->deleted) return ECORE_CALLBACK_RENEW; + if (ec->comp_data->deleted) return ECORE_CALLBACK_RENEW; e_bindings_ecore_event_mouse_button_convert(ev, &ev2); e_client_mouse_down(ec, ev->buttons, (Evas_Point*)&ev->root, &ev2); return ECORE_CALLBACK_RENEW; @@ -2091,10 +2091,10 @@ _e_comp_x_mouse_move(void *d EINA_UNUSED, int t EINA_UNUSED, Ecore_Event_Mouse_M ec = e_client_action_get(); if (!ec) return ECORE_CALLBACK_RENEW; E_COMP_X_PIXMAP_CHECK ECORE_CALLBACK_RENEW; - if (ec->x_comp_data->deleted || e_client_util_ignored_get(ec)) return ECORE_CALLBACK_RENEW; + if (ec->comp_data->deleted || e_client_util_ignored_get(ec)) return ECORE_CALLBACK_RENEW; if (e_client_util_resizing_get(ec) && ec->netwm.sync.request && - ec->x_comp_data->alarm + ec->comp_data->alarm ) { if ((ecore_loop_time_get() - ec->netwm.sync.send_time) > 0.5) @@ -2217,7 +2217,7 @@ _e_comp_x_sync_alarm(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event if (ec->netwm.sync.wait) ec->netwm.sync.wait--; - if (ecore_x_sync_counter_query(ec->x_comp_data->sync_counter, &serial)) + if (ecore_x_sync_counter_query(ec->comp_data->sync_counter, &serial)) { E_Client_Pending_Resize *pnd = NULL; @@ -2470,13 +2470,13 @@ _e_comp_x_shape(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_Wind } else { - if ((ec->x_comp_data->shape.x != ev->x) || - (ec->x_comp_data->shape.y != ev->y) || - (ec->x_comp_data->shape.w != ev->w) || - (ec->x_comp_data->shape.h != ev->h)) + if ((ec->comp_data->shape.x != ev->x) || + (ec->comp_data->shape.y != ev->y) || + (ec->comp_data->shape.w != ev->w) || + (ec->comp_data->shape.h != ev->h)) { /* bounding box changed, need export for rendering */ - EINA_RECTANGLE_SET(&ec->x_comp_data->shape, ev->x, ev->y, ev->w, ev->h); + EINA_RECTANGLE_SET(&ec->comp_data->shape, ev->x, ev->y, ev->w, ev->h); ec->need_shape_export = !ec->override; } ec->changes.shape = 1; @@ -2500,12 +2500,12 @@ _e_comp_x_damage(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_Dam ec = _e_comp_x_client_find_by_damage(ev->damage); if (!ec) return ECORE_CALLBACK_PASS_ON; - if (ec->x_comp_data->damage) + if (ec->comp_data->damage) { Ecore_X_Region parts; parts = ecore_x_region_new(NULL, 0); - ecore_x_damage_subtract(ec->x_comp_data->damage, 0, parts); + ecore_x_damage_subtract(ec->comp_data->damage, 0, parts); ecore_x_region_free(parts); } //WRN("DAMAGE %p: %dx%d", ec, ev->area.width, ev->area.height); @@ -2514,15 +2514,15 @@ _e_comp_x_damage(void *data EINA_UNUSED, int type EINA_UNUSED, Ecore_X_Event_Dam e_pixmap_dirty(ec->pixmap); /* discard unwanted xy position of first damage * to avoid wrong composition for override redirect window */ - else if ((ec->override) && (!ec->x_comp_data->first_damage)) + else if ((ec->override) && (!ec->comp_data->first_damage)) e_comp_object_damage(ec->frame, 0, 0, ev->area.width, ev->area.height); else e_comp_object_damage(ec->frame, ev->area.x, ev->area.y, ev->area.width, ev->area.height); - if ((!ec->re_manage) && (!ec->override) && (!ec->x_comp_data->first_damage)) + if ((!ec->re_manage) && (!ec->override) && (!ec->comp_data->first_damage)) e_comp_object_render_update_del(ec->frame); else - E_FREE_FUNC(ec->x_comp_data->first_draw_delay, ecore_timer_del); - ec->x_comp_data->first_damage = 1; + E_FREE_FUNC(ec->comp_data->first_draw_delay, ecore_timer_del); + ec->comp_data->first_damage = 1; return ECORE_CALLBACK_RENEW; } @@ -2620,7 +2620,7 @@ _e_comp_x_hook_client_post_new_client(void *d EINA_UNUSED, E_Client *ec) if (ec->need_shape_merge) { _e_comp_x_client_shape_input_rectangle_set(ec); - if ((!ec->shaped) && ec->x_comp_data->reparented) + if ((!ec->shaped) && ec->comp_data->reparented) ecore_x_window_shape_mask_set(e_client_util_pwin_get(ec), 0); ec->need_shape_merge = 0; } @@ -2653,7 +2653,7 @@ _e_comp_x_hook_client_post_new_client(void *d EINA_UNUSED, E_Client *ec) win->step_x, win->step_y, win->min_aspect, win->max_aspect); ec->changes.internal_props = 0; - ec->x_comp_data->internal_props_set++; + ec->comp_data->internal_props_set++; } if (ec->need_shape_export) @@ -2681,7 +2681,7 @@ _e_comp_x_hook_client_pre_frame_assign(void *d EINA_UNUSED, E_Client *ec) E_COMP_X_PIXMAP_CHECK; win = e_client_util_win_get(ec); - if (!ec->x_comp_data->need_reparent) return; + if (!ec->comp_data->need_reparent) return; w = MAX(ec->client.w, 1); h = MAX(ec->client.h, 1); /* match ec parent argbness */ @@ -2742,7 +2742,7 @@ _e_comp_x_hook_client_pre_frame_assign(void *d EINA_UNUSED, E_Client *ec) if (ec->visible) { - if (ec->x_comp_data->set_win_type && ec->internal_ecore_evas) + if (ec->comp_data->set_win_type && ec->internal_ecore_evas) { E_Win *ewin = ecore_evas_data_get(ec->internal_ecore_evas, "E_Win"); @@ -2753,7 +2753,7 @@ _e_comp_x_hook_client_pre_frame_assign(void *d EINA_UNUSED, E_Client *ec) else ecore_x_netwm_window_type_set(win, ECORE_X_WINDOW_TYPE_NORMAL); } - ec->x_comp_data->set_win_type = 0; + ec->comp_data->set_win_type = 0; } } if (ec->re_manage || ec->visible) @@ -2769,15 +2769,15 @@ _e_comp_x_hook_client_pre_frame_assign(void *d EINA_UNUSED, E_Client *ec) if (ec->netwm.ping && (!ec->ping_poller)) e_client_ping(ec); if (ec->visible) evas_object_show(ec->frame); - ec->x_comp_data->need_reparent = 0; + ec->comp_data->need_reparent = 0; ec->redirected = 1; - if (ec->x_comp_data->change_icon) + if (ec->comp_data->change_icon) { ec->changes.icon = 1; EC_CHANGED(ec); } - ec->x_comp_data->change_icon = 0; - ec->x_comp_data->reparented = 1; + ec->comp_data->change_icon = 0; + ec->comp_data->reparented = 1; _e_comp_x_evas_comp_hidden_cb(ec, NULL, NULL); } @@ -2983,7 +2983,7 @@ _e_comp_x_hook_client_fetch(void *d EINA_UNUSED, E_Client *ec) if (ec->changes.prop || ec->netwm.fetch.type) { e_hints_window_type_get(ec); - if (((!ec->lock_border) || (!ec->border.name)) && ec->x_comp_data->reparented) + if (((!ec->lock_border) || (!ec->border.name)) && ec->comp_data->reparented) { ec->border.changed = 1; EC_CHANGED(ec); @@ -3129,7 +3129,7 @@ _e_comp_x_hook_client_fetch(void *d EINA_UNUSED, E_Client *ec) if (ec->zone) e_zone_useful_geometry_get(ec->zone, &zx, &zy, &zw, &zh); e_comp_object_frame_geometry_get(ec->frame, &l, &r, &t, &b); - att = &ec->x_comp_data->initial_attributes; + att = &ec->comp_data->initial_attributes; bw = att->border * 2; switch (ec->icccm.gravity) { @@ -3290,13 +3290,13 @@ _e_comp_x_hook_client_fetch(void *d EINA_UNUSED, E_Client *ec) { ec->netwm.sync.request = 1; if (!ecore_x_netwm_sync_counter_get(win, - &ec->x_comp_data->sync_counter)) + &ec->comp_data->sync_counter)) ec->netwm.sync.request = 0; } } free(proto); } - if (ec->netwm.ping && ec->x_comp_data->evas_init) + if (ec->netwm.ping && ec->comp_data->evas_init) e_client_ping(ec); else E_FREE_FUNC(ec->ping_poller, ecore_poller_del); @@ -3335,13 +3335,13 @@ _e_comp_x_hook_client_fetch(void *d EINA_UNUSED, E_Client *ec) { ec->parent->modal = ec; ec->parent->lock_close = 1; - if (!ec->parent->x_comp_data->lock_win) + if (!ec->parent->comp_data->lock_win) { - eina_hash_add(clients_win_hash, &ec->parent->x_comp_data->lock_win, ec->parent); - ec->parent->x_comp_data->lock_win = ecore_x_window_input_new(e_client_util_pwin_get(ec->parent), 0, 0, ec->parent->w, ec->parent->h); - e_comp_ignore_win_add(E_PIXMAP_TYPE_X, ec->parent->x_comp_data->lock_win); - ecore_x_window_show(ec->parent->x_comp_data->lock_win); - ecore_x_icccm_name_class_set(ec->parent->x_comp_data->lock_win, "comp_data->lock_win", "comp_data->lock_win"); + eina_hash_add(clients_win_hash, &ec->parent->comp_data->lock_win, ec->parent); + ec->parent->comp_data->lock_win = ecore_x_window_input_new(e_client_util_pwin_get(ec->parent), 0, 0, ec->parent->w, ec->parent->h); + e_comp_ignore_win_add(E_PIXMAP_TYPE_X, ec->parent->comp_data->lock_win); + ecore_x_window_show(ec->parent->comp_data->lock_win); + ecore_x_icccm_name_class_set(ec->parent->comp_data->lock_win, "comp_data->lock_win", "comp_data->lock_win"); } } @@ -3488,59 +3488,59 @@ _e_comp_x_hook_client_fetch(void *d EINA_UNUSED, E_Client *ec) ec->vkbd.fetch.vkbd = 0; rem_change = 1; } - if (ec->x_comp_data->illume.conformant.fetch.conformant) + if (ec->comp_data->illume.conformant.fetch.conformant) { - ec->x_comp_data->illume.conformant.conformant = + ec->comp_data->illume.conformant.conformant = ecore_x_e_illume_conformant_get(win); - ec->x_comp_data->illume.conformant.fetch.conformant = 0; + ec->comp_data->illume.conformant.fetch.conformant = 0; } - if (ec->x_comp_data->illume.quickpanel.fetch.state) + if (ec->comp_data->illume.quickpanel.fetch.state) { - ec->x_comp_data->illume.quickpanel.state = + ec->comp_data->illume.quickpanel.state = ecore_x_e_illume_quickpanel_state_get(win); - ec->x_comp_data->illume.quickpanel.fetch.state = 0; + ec->comp_data->illume.quickpanel.fetch.state = 0; } - if (ec->x_comp_data->illume.quickpanel.fetch.quickpanel) + if (ec->comp_data->illume.quickpanel.fetch.quickpanel) { - ec->x_comp_data->illume.quickpanel.quickpanel = + ec->comp_data->illume.quickpanel.quickpanel = ecore_x_e_illume_quickpanel_get(win); - ec->x_comp_data->illume.quickpanel.fetch.quickpanel = 0; + ec->comp_data->illume.quickpanel.fetch.quickpanel = 0; } - if (ec->x_comp_data->illume.quickpanel.fetch.priority.major) + if (ec->comp_data->illume.quickpanel.fetch.priority.major) { - ec->x_comp_data->illume.quickpanel.priority.major = + ec->comp_data->illume.quickpanel.priority.major = ecore_x_e_illume_quickpanel_priority_major_get(win); - ec->x_comp_data->illume.quickpanel.fetch.priority.major = 0; + ec->comp_data->illume.quickpanel.fetch.priority.major = 0; } - if (ec->x_comp_data->illume.quickpanel.fetch.priority.minor) + if (ec->comp_data->illume.quickpanel.fetch.priority.minor) { - ec->x_comp_data->illume.quickpanel.priority.minor = + ec->comp_data->illume.quickpanel.priority.minor = ecore_x_e_illume_quickpanel_priority_minor_get(win); - ec->x_comp_data->illume.quickpanel.fetch.priority.minor = 0; + ec->comp_data->illume.quickpanel.fetch.priority.minor = 0; } - if (ec->x_comp_data->illume.quickpanel.fetch.zone) + if (ec->comp_data->illume.quickpanel.fetch.zone) { - ec->x_comp_data->illume.quickpanel.zone = + ec->comp_data->illume.quickpanel.zone = ecore_x_e_illume_quickpanel_zone_get(win); - ec->x_comp_data->illume.quickpanel.fetch.zone = 0; + ec->comp_data->illume.quickpanel.fetch.zone = 0; } - if (ec->x_comp_data->illume.drag.fetch.drag) + if (ec->comp_data->illume.drag.fetch.drag) { - ec->x_comp_data->illume.drag.drag = + ec->comp_data->illume.drag.drag = ecore_x_e_illume_drag_get(win); - ec->x_comp_data->illume.drag.fetch.drag = 0; + ec->comp_data->illume.drag.fetch.drag = 0; } - if (ec->x_comp_data->illume.drag.fetch.locked) + if (ec->comp_data->illume.drag.fetch.locked) { - ec->x_comp_data->illume.drag.locked = + ec->comp_data->illume.drag.locked = ecore_x_e_illume_drag_locked_get(win); - ec->x_comp_data->illume.drag.fetch.locked = 0; + ec->comp_data->illume.drag.fetch.locked = 0; } - if (ec->x_comp_data->illume.win_state.fetch.state) + if (ec->comp_data->illume.win_state.fetch.state) { - ec->x_comp_data->illume.win_state.state = + ec->comp_data->illume.win_state.state = ecore_x_e_illume_window_state_get(win); - ec->x_comp_data->illume.win_state.fetch.state = 0; + ec->comp_data->illume.win_state.fetch.state = 0; } if (ec->changes.shape) { @@ -3581,7 +3581,7 @@ _e_comp_x_hook_client_fetch(void *d EINA_UNUSED, E_Client *ec) if (ec->shaped) { ec->shaped = 0; - if (ec->x_comp_data->reparented && (!ec->bordername)) + if (ec->comp_data->reparented && (!ec->bordername)) { ec->border.changed = 1; EC_CHANGED(ec); @@ -3590,7 +3590,7 @@ _e_comp_x_hook_client_fetch(void *d EINA_UNUSED, E_Client *ec) } else { - if (ec->x_comp_data->reparented) + if (ec->comp_data->reparented) { ecore_x_window_shape_rectangles_set(pwin, rects, num); if ((!ec->shaped) && (!ec->bordername)) @@ -3609,7 +3609,7 @@ _e_comp_x_hook_client_fetch(void *d EINA_UNUSED, E_Client *ec) E_FREE(ec->shape_input_rects); ec->shape_input_rects_num = 0; } - if (ec->x_comp_data->reparented || (!ec->shaped)) + if (ec->comp_data->reparented || (!ec->shaped)) free(rects); if (ec->shape_changed) e_comp_object_frame_theme_set(ec->frame, E_COMP_OBJECT_FRAME_RESHADOW); @@ -3617,7 +3617,7 @@ _e_comp_x_hook_client_fetch(void *d EINA_UNUSED, E_Client *ec) else { // FIXME: no rects i think can mean... totally empty window - if (ec->shaped && ec->x_comp_data->reparented && (!ec->bordername)) + if (ec->shaped && ec->comp_data->reparented && (!ec->bordername)) { ec->border.changed = 1; EC_CHANGED(ec); @@ -3627,7 +3627,7 @@ _e_comp_x_hook_client_fetch(void *d EINA_UNUSED, E_Client *ec) if (ec->shaped != pshaped) { _e_comp_x_client_shape_input_rectangle_set(ec); - if ((!ec->shaped) && ec->x_comp_data->reparented) + if ((!ec->shaped) && ec->comp_data->reparented) ecore_x_window_shape_mask_set(pwin, 0); } ec->need_shape_merge = 1; @@ -3673,7 +3673,7 @@ _e_comp_x_hook_client_fetch(void *d EINA_UNUSED, E_Client *ec) else { ec->shaped_input = 1; - if (ec->x_comp_data->reparented) + if (ec->comp_data->reparented) ecore_x_window_shape_input_rectangles_set(pwin, rects, num); changed = EINA_TRUE; free(ec->shape_input_rects); @@ -3709,7 +3709,7 @@ _e_comp_x_hook_client_fetch(void *d EINA_UNUSED, E_Client *ec) } if (ec->mwm.borderless != pb) { - if (ec->x_comp_data->reparented && ((!ec->lock_border) || (!ec->border.name))) + if (ec->comp_data->reparented && ((!ec->lock_border) || (!ec->border.name))) { ec->border.changed = 1; EC_CHANGED(ec); @@ -3774,7 +3774,7 @@ _e_comp_x_hook_client_fetch(void *d EINA_UNUSED, E_Client *ec) /* Some stats might change the border, like modal */ if (((!ec->lock_border) || (!ec->border.name)) && (!(((ec->maximized & E_MAXIMIZE_TYPE) == E_MAXIMIZE_FULLSCREEN))) && - ec->x_comp_data->reparented) + ec->comp_data->reparented) { ec->border.changed = 1; EC_CHANGED(ec); @@ -3811,12 +3811,12 @@ _e_comp_x_hook_client_fetch(void *d EINA_UNUSED, E_Client *ec) ec->netwm.update.state = 0; } - if (ec->x_comp_data->fetch_exe) + if (ec->comp_data->fetch_exe) { E_Exec_Instance *inst; if (((!ec->lock_border) || (!ec->border.name)) && - (ec->x_comp_data->reparented)) + (ec->comp_data->reparented)) { ec->border.changed = 1; EC_CHANGED(ec); @@ -3928,7 +3928,7 @@ _e_comp_x_hook_client_fetch(void *d EINA_UNUSED, E_Client *ec) } } } - ec->x_comp_data->fetch_exe = 0; + ec->comp_data->fetch_exe = 0; } if ((e_config->use_desktop_window_profile) && (need_desk_set)) @@ -4005,12 +4005,12 @@ _e_comp_x_hook_client_fetch(void *d EINA_UNUSED, E_Client *ec) } ec->changes.prop = 0; if (rem_change) e_remember_update(ec); - if (!ec->x_comp_data->reparented) ec->changes.border = 0; + if (!ec->comp_data->reparented) ec->changes.border = 0; if (ec->changes.icon) { /* don't create an icon until we need it */ - if (ec->x_comp_data->reparented) return; - ec->x_comp_data->change_icon = 1; + if (ec->comp_data->reparented) return; + ec->comp_data->change_icon = 1; ec->changes.icon = 0; } } @@ -4020,7 +4020,7 @@ _e_comp_x_first_draw_delay_cb(void *data) { E_Client *ec = data; - ec->x_comp_data->first_draw_delay = NULL; + ec->comp_data->first_draw_delay = NULL; e_comp_object_damage(ec->frame, 0, 0, ec->w, ec->h); return EINA_FALSE; } @@ -4034,8 +4034,8 @@ _e_comp_x_hook_client_new(void *d EINA_UNUSED, E_Client *ec) win = e_pixmap_window_get(ec->pixmap); ec->ignored = e_comp_ignore_win_find(win); - ec->x_comp_data = E_NEW(E_Comp_X_Client_Data, 1); - ec->x_comp_data->set_win_type = ec->x_comp_data->fetch_exe = 1; + ec->comp_data = E_NEW(E_Comp_Client_Data, 1); + ec->comp_data->set_win_type = ec->comp_data->fetch_exe = 1; /* FIXME: ewww - round trip */ ec->argb = ecore_x_window_argb_get(win); @@ -4047,11 +4047,11 @@ _e_comp_x_hook_client_new(void *d EINA_UNUSED, E_Client *ec) if (!_e_comp_x_client_new_helper(ec)) return; - ec->x_comp_data->first_damage = ec->internal; + ec->comp_data->first_damage = ec->internal; eina_hash_add(clients_win_hash, &win, ec); e_hints_client_list_set(); - ec->x_comp_data->first_draw_delay = ecore_timer_add(e_comp_config_get()->first_draw_delay, _e_comp_x_first_draw_delay_cb, ec); + ec->comp_data->first_draw_delay = ecore_timer_add(e_comp_config_get()->first_draw_delay, _e_comp_x_first_draw_delay_cb, ec); } static void @@ -4090,10 +4090,10 @@ static void _e_comp_x_hook_client_redirect(void *d EINA_UNUSED, E_Client *ec) { E_COMP_X_PIXMAP_CHECK; - if (ec->x_comp_data->unredirected_single) + if (ec->comp_data->unredirected_single) { ecore_x_composite_redirect_window(_e_comp_x_client_window_get(ec), ECORE_X_COMPOSITE_UPDATE_MANUAL); - ec->x_comp_data->unredirected_single = 0; + ec->comp_data->unredirected_single = 0; } else if (ec->comp->nocomp) { @@ -4104,7 +4104,7 @@ _e_comp_x_hook_client_redirect(void *d EINA_UNUSED, E_Client *ec) ecore_x_window_reparent(_e_comp_x_client_window_get(ec), ec->comp->man->root, ec->client.x, ec->client.y); _e_comp_x_client_stack(ec); } - if (!ec->x_comp_data->damage) + if (!ec->comp_data->damage) _e_comp_x_client_damage_add(ec); } @@ -4114,19 +4114,19 @@ _e_comp_x_hook_client_unredirect(void *d EINA_UNUSED, E_Client *ec) Ecore_X_Region parts; E_COMP_X_PIXMAP_CHECK; - eina_hash_del(damages_hash, &ec->x_comp_data->damage, ec); + eina_hash_del(damages_hash, &ec->comp_data->damage, ec); parts = ecore_x_region_new(NULL, 0); - ecore_x_damage_subtract(ec->x_comp_data->damage, 0, parts); + ecore_x_damage_subtract(ec->comp_data->damage, 0, parts); ecore_x_region_free(parts); - ecore_x_damage_free(ec->x_comp_data->damage); - ec->x_comp_data->damage = 0; + ecore_x_damage_free(ec->comp_data->damage); + ec->comp_data->damage = 0; - if (ec->unredirected_single && (!ec->x_comp_data->unredirected_single)) + if (ec->unredirected_single && (!ec->comp_data->unredirected_single)) { ecore_x_composite_unredirect_window(_e_comp_x_client_window_get(ec), ECORE_X_COMPOSITE_UPDATE_MANUAL); ecore_x_window_reparent(_e_comp_x_client_window_get(ec), ec->comp->win, ec->client.x, ec->client.y); ecore_x_window_raise(_e_comp_x_client_window_get(ec)); - ec->x_comp_data->unredirected_single = 1; + ec->comp_data->unredirected_single = 1; } if (!ec->comp->nocomp) return; //wait for it... ecore_x_composite_unredirect_subwindows(ec->comp->man->root, ECORE_X_COMPOSITE_UPDATE_MANUAL); @@ -4142,14 +4142,14 @@ _e_comp_x_hook_client_del(void *d EINA_UNUSED, E_Client *ec) E_COMP_X_PIXMAP_CHECK; win = e_client_util_win_get(ec); - if ((!stopping) && (!ec->x_comp_data->deleted)) + if ((!stopping) && (!ec->comp_data->deleted)) ecore_x_window_prop_card32_set(win, E_ATOM_MANAGED, &visible, 1); - if ((!ec->already_unparented) && ec->x_comp_data->reparented) + if ((!ec->already_unparented) && ec->comp_data->reparented) { e_bindings_mouse_ungrab(E_BINDING_CONTEXT_WINDOW, e_client_util_pwin_get(ec)); e_bindings_wheel_ungrab(E_BINDING_CONTEXT_WINDOW, e_client_util_pwin_get(ec)); _e_comp_x_focus_setdown(ec); - if (!ec->x_comp_data->deleted) + if (!ec->comp_data->deleted) { if (stopping) { @@ -4165,21 +4165,21 @@ _e_comp_x_hook_client_del(void *d EINA_UNUSED, E_Client *ec) else /* put the window back where we found it to prevent annoying dancing windows */ ecore_x_window_reparent(win, ec->comp->man->root, - ec->x_comp_data->initial_attributes.x, - ec->x_comp_data->initial_attributes.y); + ec->comp_data->initial_attributes.x, + ec->comp_data->initial_attributes.y); if (!ec->internal) ecore_x_window_save_set_del(win); } } ec->already_unparented = 1; eina_hash_del_by_key(clients_win_hash, &win); - if (ec->x_comp_data->damage) + if (ec->comp_data->damage) { - eina_hash_del(damages_hash, &ec->x_comp_data->damage, ec); - ecore_x_damage_free(ec->x_comp_data->damage); - ec->x_comp_data->damage = 0; + eina_hash_del(damages_hash, &ec->comp_data->damage, ec); + ecore_x_damage_free(ec->comp_data->damage); + ec->comp_data->damage = 0; } - if (ec->x_comp_data->reparented) + if (ec->comp_data->reparented) { win = e_client_util_pwin_get(ec); eina_hash_del_by_key(clients_win_hash, &win); @@ -4191,18 +4191,18 @@ _e_comp_x_hook_client_del(void *d EINA_UNUSED, E_Client *ec) _e_comp_x_mapping_change_disabled--; if (ec->parent && (ec->parent->modal == ec)) { - if (ec->parent->x_comp_data->lock_win) + if (ec->parent->comp_data->lock_win) { - eina_hash_del_by_key(clients_win_hash, &ec->parent->x_comp_data->lock_win); - ecore_x_window_hide(ec->parent->x_comp_data->lock_win); - ecore_x_window_free(ec->parent->x_comp_data->lock_win); - ec->parent->x_comp_data->lock_win = 0; + eina_hash_del_by_key(clients_win_hash, &ec->parent->comp_data->lock_win); + ecore_x_window_hide(ec->parent->comp_data->lock_win); + ecore_x_window_free(ec->parent->comp_data->lock_win); + ec->parent->comp_data->lock_win = 0; } ec->parent->lock_close = 0; ec->parent->modal = NULL; } - E_FREE_FUNC(ec->x_comp_data->first_draw_delay, ecore_timer_del); - E_FREE(ec->x_comp_data); + E_FREE_FUNC(ec->comp_data->first_draw_delay, ecore_timer_del); + E_FREE(ec->comp_data); if (post_clients) post_clients = eina_list_remove(post_clients, ec); @@ -4213,9 +4213,9 @@ static void _e_comp_x_hook_client_move_end(void *d EINA_UNUSED, E_Client *ec) { E_COMP_X_PIXMAP_CHECK; - ec->x_comp_data->moving = 0; - if (!ec->x_comp_data->move_counter) return; - ec->x_comp_data->move_counter = 0; + ec->comp_data->moving = 0; + if (!ec->comp_data->move_counter) return; + ec->comp_data->move_counter = 0; ec->post_move = 1; _e_comp_x_post_client_idler_add(ec); } @@ -4224,17 +4224,17 @@ static void _e_comp_x_hook_client_move_begin(void *d EINA_UNUSED, E_Client *ec) { E_COMP_X_PIXMAP_CHECK; - ec->x_comp_data->moving = 1; + ec->comp_data->moving = 1; } static void _e_comp_x_hook_client_resize_end(void *d EINA_UNUSED, E_Client *ec) { E_COMP_X_PIXMAP_CHECK; - if (!ec->x_comp_data->alarm) return; - eina_hash_del_by_key(alarm_hash, &ec->x_comp_data->alarm); - ecore_x_sync_alarm_free(ec->x_comp_data->alarm); - ec->x_comp_data->alarm = 0; + if (!ec->comp_data->alarm) return; + eina_hash_del_by_key(alarm_hash, &ec->comp_data->alarm); + ecore_x_sync_alarm_free(ec->comp_data->alarm); + ec->comp_data->alarm = 0; ec->netwm.sync.alarm = 0; /* resize to last geometry if sync alarm for it was not yet handled */ if (ec->pending_resize) @@ -4252,8 +4252,8 @@ _e_comp_x_hook_client_resize_begin(void *d EINA_UNUSED, E_Client *ec) { E_COMP_X_PIXMAP_CHECK; if (!ec->netwm.sync.request) return; - ec->x_comp_data->alarm = ecore_x_sync_alarm_new(ec->x_comp_data->sync_counter); - eina_hash_add(alarm_hash, &ec->x_comp_data->alarm, ec); + ec->comp_data->alarm = ecore_x_sync_alarm_new(ec->comp_data->sync_counter); + eina_hash_add(alarm_hash, &ec->comp_data->alarm, ec); ec->netwm.sync.alarm = ec->netwm.sync.serial = 1; ec->netwm.sync.wait = 0; ec->netwm.sync.send_time = ecore_loop_time_get(); @@ -4734,7 +4734,7 @@ _e_comp_x_manage_windows(E_Comp *c) * should be seen */ ec = _e_comp_x_client_new(c, windows[i], 1); } - if (ec && (!ec->x_comp_data->initial_attributes.visible)) + if (ec && (!ec->comp_data->initial_attributes.visible)) E_FREE_FUNC(ec, e_object_del); if (ec) { @@ -4744,7 +4744,7 @@ _e_comp_x_manage_windows(E_Comp *c) if (!ec->input_only) _e_comp_x_client_damage_add(ec); e_pixmap_usable_set(ec->pixmap, 1); - ec->x_comp_data->first_map = 1; + ec->comp_data->first_map = 1; } ec->ignore_first_unmap = 1; evas_object_show(ec->frame); @@ -4899,7 +4899,7 @@ _e_comp_x_setup(E_Comp *c, Ecore_X_Window root, int w, int h) if (!ecore_x_window_manage(root)) return EINA_FALSE; E_OBJECT_DEL_SET(c, _e_comp_x_del); - c->x_comp_data = E_NEW(E_Comp_X_Data, 1); + c->x_comp_data = E_NEW(E_Comp_Data, 1); ecore_x_e_window_profile_supported_set(root, e_config->use_desktop_window_profile); c->cm_selection = ecore_x_window_input_new(root, 0, 0, 1, 1); if (!c->cm_selection) return EINA_FALSE; diff --git a/src/bin/e_comp_x.h b/src/bin/e_comp_x.h index c3cc4a368..3afa899da 100644 --- a/src/bin/e_comp_x.h +++ b/src/bin/e_comp_x.h @@ -1,8 +1,10 @@ #ifdef E_TYPEDEFS # include -# include "e_atoms.h" -# include "e_hints.h" -# include "e_randr.h" +# include "e_atoms.h" +# include "e_hints.h" +# include "e_randr.h" + +typedef struct _E_Comp_X_Client_Data E_Comp_X_Client_Data; #else # ifndef E_COMP_X_H diff --git a/src/bin/e_hints.c b/src/bin/e_hints.c index bdd6d4450..4b02b71d8 100644 --- a/src/bin/e_hints.c +++ b/src/bin/e_hints.c @@ -721,7 +721,9 @@ e_hints_window_state_update(E_Client *ec, int state, int action) { case ECORE_X_WINDOW_STATE_ICONIFIED: if (action != ECORE_X_WINDOW_STATE_ACTION_ADD) return; +#ifndef HAVE_WAYLAND_ONLY if (ec->icccm.state == ECORE_X_WINDOW_STATE_HINT_ICONIC) return; +#endif if (ec->lock_client_iconify) return; e_client_iconify(ec); break; diff --git a/src/bin/e_includes.h b/src/bin/e_includes.h index a12083702..65383591a 100644 --- a/src/bin/e_includes.h +++ b/src/bin/e_includes.h @@ -8,8 +8,8 @@ #include "e_zone.h" #include "e_desk.h" #include "e_auth.h" -#ifndef HAVE_WAYLAND_ONLY -# include "e_comp_x.h" +#ifdef NEED_X +# include "e_comp_x.h" #endif #include "e_pixmap.h" #include "e_comp_object.h" @@ -158,5 +158,7 @@ #if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY) # include "e_comp_wl.h" +# include "e_comp_wl_data.h" +# include "e_comp_wl_input.h" # include "e_uuid_store.h" #endif diff --git a/src/bin/e_int_client_prop.c b/src/bin/e_int_client_prop.c index f172d842d..d83c70d13 100644 --- a/src/bin/e_int_client_prop.c +++ b/src/bin/e_int_client_prop.c @@ -145,7 +145,7 @@ _create_data(E_Dialog *cfd, E_Client *ec) cfdata->client->icccm.max_aspect); cfdata->icccm.aspect = strdup(buf); } -#ifdef E_COMP_X_H +#ifndef HAVE_WAYLAND_ONLY if (cfdata->client->icccm.initial_state != ECORE_X_WINDOW_STATE_HINT_NONE) { switch (cfdata->client->icccm.initial_state) @@ -212,7 +212,7 @@ _create_data(E_Dialog *cfd, E_Client *ec) (unsigned int)cfdata->client->icccm.client_leader); cfdata->icccm.client_leader = strdup(buf); } -#ifdef E_COMP_X_H +#ifndef HAVE_WAYLAND_ONLY switch (cfdata->client->icccm.gravity) { case ECORE_X_GRAVITY_FORGET: diff --git a/src/bin/e_pixmap.c b/src/bin/e_pixmap.c index cd09d6041..a2c3c7e55 100644 --- a/src/bin/e_pixmap.c +++ b/src/bin/e_pixmap.c @@ -377,6 +377,7 @@ e_pixmap_refresh(E_Pixmap *cp) { uint32_t pixmap; int pw, ph; + E_Comp_X_Client_Data *cd = (E_Comp_X_Client_Data*)cp->client->comp_data; pixmap = ecore_x_composite_name_window_pixmap_get(cp->parent ?: cp->win); if (cp->client) @@ -386,8 +387,8 @@ e_pixmap_refresh(E_Pixmap *cp) if (cp->client->comp_data && cp->client->comp_data->pw && cp->client->comp_data->ph) { - pw = cp->client->x_comp_data->pw; - ph = cp->client->x_comp_data->ph; + pw = cd->pw; + ph = cd->ph; } else ecore_x_pixmap_geometry_get(pixmap, NULL, NULL, &pw, &ph); @@ -635,6 +636,7 @@ e_pixmap_image_refresh(E_Pixmap *cp) cp->image = ecore_x_image_new(cp->w, cp->h, cp->visual, cp->client->depth); if (cp->image) cp->image_argb = ecore_x_image_is_argb32_get(cp->image); + return !!cp->image; #endif break; case E_PIXMAP_TYPE_WL: @@ -646,7 +648,8 @@ e_pixmap_image_refresh(E_Pixmap *cp) default: break; } - return !!cp->image; + + return EINA_FALSE; } EAPI Eina_Bool diff --git a/src/modules/Makefile_access.mk b/src/modules/Makefile_access.mk index 19024f5f4..d98733436 100644 --- a/src/modules/Makefile_access.mk +++ b/src/modules/Makefile_access.mk @@ -8,7 +8,7 @@ accesspkgdir = $(MDIR)/access/$(MODULE_ARCH) accesspkg_LTLIBRARIES = src/modules/access/module.la src_modules_access_module_la_LIBADD = $(MOD_LIBS) -src_modules_access_module_la_CPPFLAGS = $(MOD_CPPFLAGS) +src_modules_access_module_la_CPPFLAGS = $(MOD_CPPFLAGS) -DNEED_X src_modules_access_module_la_LDFLAGS = $(MOD_LDFLAGS) src_modules_access_module_la_SOURCES = src/modules/access/e_mod_main.c \ src/modules/access/e_mod_main.h \ diff --git a/src/modules/Makefile_contact.mk b/src/modules/Makefile_contact.mk index ac98ffd7d..2e949d197 100644 --- a/src/modules/Makefile_contact.mk +++ b/src/modules/Makefile_contact.mk @@ -9,7 +9,7 @@ contactpkgdir = $(MDIR)/contact/$(MODULE_ARCH) contactpkg_LTLIBRARIES = src/modules/contact/module.la src_modules_contact_module_la_LIBADD = $(MOD_LIBS) -src_modules_contact_module_la_CPPFLAGS = $(MOD_CPPFLAGS) +src_modules_contact_module_la_CPPFLAGS = $(MOD_CPPFLAGS) -DNEED_X src_modules_contact_module_la_LDFLAGS = $(MOD_LDFLAGS) src_modules_contact_module_la_SOURCES = src/modules/contact/e_mod_main.c \ src/modules/contact/e_mod_main.h \ diff --git a/src/modules/Makefile_wl_desktop_shell.mk b/src/modules/Makefile_wl_desktop_shell.mk index 58aa2d487..53c852556 100644 --- a/src/modules/Makefile_wl_desktop_shell.mk +++ b/src/modules/Makefile_wl_desktop_shell.mk @@ -12,7 +12,7 @@ wl_desktop_shellpkgdir = $(MDIR)/wl_desktop_shell/$(MODULE_ARCH) wl_desktop_shellpkg_LTLIBRARIES = src/modules/wl_desktop_shell/module.la src_modules_wl_desktop_shell_module_la_DEPENDENCIES = $(MDEPENDENCIES) -src_modules_wl_desktop_shell_module_la_CPPFLAGS = $(MOD_CPPFLAGS) @WL_DESKTOP_SHELL_CFLAGS@ @WAYLAND_CFLAGS@ +src_modules_wl_desktop_shell_module_la_CPPFLAGS = $(MOD_CPPFLAGS) @WL_DESKTOP_SHELL_CFLAGS@ @WAYLAND_CFLAGS@ -DNEED_WL src_modules_wl_desktop_shell_module_la_LIBADD = $(LIBS) @WL_DESKTOP_SHELL_LIBS@ @WAYLAND_LIBS@ src_modules_wl_desktop_shell_module_la_LDFLAGS = $(MOD_LDFLAGS) diff --git a/src/modules/Makefile_wl_fb.mk b/src/modules/Makefile_wl_fb.mk index 9765dd53f..34cbeae85 100644 --- a/src/modules/Makefile_wl_fb.mk +++ b/src/modules/Makefile_wl_fb.mk @@ -5,7 +5,7 @@ wl_fbpkgdir = $(MDIR)/wl_fb/$(MODULE_ARCH) wl_fbpkg_LTLIBRARIES = src/modules/wl_fb/module.la src_modules_wl_fb_module_la_DEPENDENCIES = $(MDEPENDENCIES) -src_modules_wl_fb_module_la_CPPFLAGS = $(MOD_CPPFLAGS) @WL_FB_CFLAGS@ @WAYLAND_CFLAGS@ -DNEED_X=1 +src_modules_wl_fb_module_la_CPPFLAGS = $(MOD_CPPFLAGS) @WL_FB_CFLAGS@ @WAYLAND_CFLAGS@ src_modules_wl_fb_module_la_LIBADD = $(LIBS) @WL_FB_LIBS@ @WAYLAND_LIBS@ src_modules_wl_fb_module_la_LDFLAGS = $(MOD_LDFLAGS) src_modules_wl_fb_module_la_SOURCES = src/modules/wl_fb/e_mod_main.c diff --git a/src/modules/access/e_mod_main.c b/src/modules/access/e_mod_main.c index bdb117530..0e7a03a93 100644 --- a/src/modules/access/e_mod_main.c +++ b/src/modules/access/e_mod_main.c @@ -1,3 +1,4 @@ +#define E_COMP_X #include "e.h" #include "e_mod_main.h" #define HISTORY_MAX 8 diff --git a/src/modules/contact/e_policy.c b/src/modules/contact/e_policy.c index 82f31b8ef..2b8a47bcd 100644 --- a/src/modules/contact/e_policy.c +++ b/src/modules/contact/e_policy.c @@ -1,3 +1,5 @@ +#define E_COMP_X + #include "e_mod_main.h" static Eina_Bool _cb_event_add(void *data __UNUSED__, int type __UNUSED__, void *event); @@ -178,10 +180,12 @@ _cb_hook_layout(E_Comp *comp) { if (e_client_util_ignored_get(ec)) continue; if (ec->focused) have_focused = EINA_TRUE; +#ifndef HAVE_WAYLAND_ONLY if ((ec->focused) && (ec->vkbd.state > ECORE_X_VIRTUAL_KEYBOARD_STATE_OFF)) want_kbd = EINA_TRUE; if (ec->vkbd.vkbd) kbd = ec; +#endif } if ((have_focused) && (kbd_override)) want_kbd = EINA_TRUE; diff --git a/src/modules/wl_desktop_shell/e_mod_main.c b/src/modules/wl_desktop_shell/e_mod_main.c index 3eda1e008..1548bb635 100644 --- a/src/modules/wl_desktop_shell/e_mod_main.c +++ b/src/modules/wl_desktop_shell/e_mod_main.c @@ -1,10 +1,9 @@ +#define E_COMP_WL #include "e.h" -#include "e_comp_wl.h" #include "e_desktop_shell_protocol.h" #define XDG_SERVER_VERSION 3 -/* FIXME: Popup Windows !! */ static void _e_shell_surface_parent_set(E_Client *ec, struct wl_resource *parent_resource) { @@ -94,16 +93,16 @@ _e_shell_surface_cb_destroy(struct wl_resource *resource) { if (e_object_is_del(E_OBJECT(ec))) return; - if (ec->wl_comp_data) + if (ec->comp_data) { - if (ec->wl_comp_data->mapped) + if (ec->comp_data->mapped) { - if ((ec->wl_comp_data->shell.surface) && - (ec->wl_comp_data->shell.unmap)) - ec->wl_comp_data->shell.unmap(ec->wl_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); } - ec->wl_comp_data->shell.surface = NULL; + ec->comp_data->shell.surface = NULL; } } } @@ -122,7 +121,7 @@ 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; - E_Comp_Wl_Data *cdata; + E_Comp_Data *cdata; E_Binding_Event_Mouse_Button ev; /* get the client for this resource */ @@ -173,7 +172,7 @@ 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; - E_Comp_Wl_Data *cdata; + E_Comp_Data *cdata; E_Binding_Event_Mouse_Button ev; /* get the client for this resource */ @@ -254,7 +253,7 @@ _e_shell_surface_cb_toplevel_set(struct wl_client *client EINA_UNUSED, struct wl ec->border.changed = ec->changes.border = !ec->borderless; ec->changes.icon = !!ec->icccm.class; ec->netwm.type = E_WINDOW_TYPE_NORMAL; - ec->wl_comp_data->set_win_type = EINA_TRUE; + ec->comp_data->set_win_type = EINA_TRUE; if ((!ec->lock_user_maximize) && (ec->maximized)) e_client_unmaximize(ec, E_MAXIMIZE_BOTH); if ((!ec->lock_user_fullscreen) && (ec->fullscreen)) @@ -339,10 +338,10 @@ _e_shell_surface_cb_popup_set(struct wl_client *client EINA_UNUSED, struct wl_re return; } - if (ec->wl_comp_data) + if (ec->comp_data) { - ec->wl_comp_data->popup.x = x; - ec->wl_comp_data->popup.y = y; + ec->comp_data->popup.x = x; + ec->comp_data->popup.y = y; } ec->argb = EINA_TRUE; @@ -352,7 +351,7 @@ _e_shell_surface_cb_popup_set(struct wl_client *client EINA_UNUSED, struct wl_re ec->border.changed = ec->changes.border = !ec->borderless; ec->changes.icon = !!ec->icccm.class; ec->netwm.type = E_WINDOW_TYPE_POPUP_MENU; - ec->wl_comp_data->set_win_type = EINA_TRUE; + ec->comp_data->set_win_type = EINA_TRUE; ec->layer = E_LAYER_CLIENT_POPUP; /* set this client as a transient for parent */ @@ -475,8 +474,8 @@ _e_shell_surface_configure(struct wl_resource *resource, Evas_Coord x, Evas_Coor (ec->netwm.type == E_WINDOW_TYPE_POPUP_MENU) || (ec->netwm.type == E_WINDOW_TYPE_DROPDOWN_MENU)) { - x = ec->parent->client.x + ec->wl_comp_data->popup.x; - y = ec->parent->client.y + ec->wl_comp_data->popup.y; + x = ec->parent->client.x + ec->comp_data->popup.x; + y = ec->parent->client.y + ec->comp_data->popup.y; } } @@ -518,7 +517,7 @@ _e_shell_surface_ping(struct wl_resource *resource) } serial = wl_display_next_serial(ec->comp->wl_comp_data->wl.disp); - wl_shell_surface_send_ping(ec->wl_comp_data->shell.surface, serial); + wl_shell_surface_send_ping(ec->comp_data->shell.surface, serial); } static void @@ -536,12 +535,12 @@ _e_shell_surface_map(struct wl_resource *resource) } /* map this surface if needed */ - if ((!ec->wl_comp_data->mapped) && (e_pixmap_usable_get(ec->pixmap))) + if ((!ec->comp_data->mapped) && (e_pixmap_usable_get(ec->pixmap))) { ec->visible = EINA_TRUE; evas_object_show(ec->frame); evas_object_geometry_set(ec->frame, ec->x, ec->y, ec->w, ec->h); - ec->wl_comp_data->mapped = EINA_TRUE; + ec->comp_data->mapped = EINA_TRUE; } } @@ -559,11 +558,11 @@ _e_shell_surface_unmap(struct wl_resource *resource) return; } - if (ec->wl_comp_data->mapped) + if (ec->comp_data->mapped) { ec->visible = EINA_FALSE; evas_object_hide(ec->frame); - ec->wl_comp_data->mapped = EINA_FALSE; + ec->comp_data->mapped = EINA_FALSE; } } @@ -572,7 +571,7 @@ _e_shell_cb_shell_surface_get(struct wl_client *client, struct wl_resource *reso { E_Pixmap *ep; E_Client *ec; - E_Comp_Wl_Client_Data *cdata; + E_Comp_Client_Data *cdata; DBG("WL_SHELL: Surface Get %d", wl_resource_get_id(surface_resource)); @@ -607,7 +606,7 @@ _e_shell_cb_shell_surface_get(struct wl_client *client, struct wl_resource *reso } /* get the client data */ - if (!(cdata = ec->wl_comp_data)) + if (!(cdata = ec->comp_data)) { wl_resource_post_error(surface_resource, WL_DISPLAY_ERROR_INVALID_OBJECT, @@ -655,8 +654,8 @@ _e_xdg_shell_surface_cb_destroy(struct wl_client *client EINA_UNUSED, struct wl_ { /* eina_stringshare_del(ec->icccm.title); */ /* eina_stringshare_del(ec->icccm.class); */ - wl_resource_destroy(ec->wl_comp_data->shell.surface); - ec->wl_comp_data->shell.surface = NULL; + wl_resource_destroy(ec->comp_data->shell.surface); + ec->comp_data->shell.surface = NULL; } } @@ -692,7 +691,7 @@ _e_xdg_shell_surface_cb_transient_for_set(struct wl_client *client EINA_UNUSED, ec->icccm.transient_for = pwin; ec->netwm.type = E_WINDOW_TYPE_DIALOG; - ec->wl_comp_data->set_win_type = EINA_TRUE; + ec->comp_data->set_win_type = EINA_TRUE; /* set this client as a transient for parent */ _e_shell_surface_parent_set(ec, parent_resource); @@ -717,18 +716,18 @@ _e_xdg_shell_surface_cb_margin_set(struct wl_client *client EINA_UNUSED, struct /* return; */ /* } */ - /* if (!ec->wl_comp_data) return; */ - /* if (eina_rectangle_is_empty(ec->wl_comp_data->opaque)) return; */ + /* if (!ec->comp_data) return; */ + /* if (eina_rectangle_is_empty(ec->comp_data->opaque)) return; */ - /* diff = (ec->wl_comp_data->opaque->x - l); */ + /* diff = (ec->comp_data->opaque->x - l); */ - /* ec->wl_comp_data->opaque->x = l; */ - /* ec->wl_comp_data->opaque->y = t; */ + /* ec->comp_data->opaque->x = l; */ + /* ec->comp_data->opaque->y = t; */ - /* ec->wl_comp_data->opaque->w = ec->wl_comp_data->opaque->w + (diff * 2); */ - /* ec->wl_comp_data->opaque->h = ec->wl_comp_data->opaque->h + (diff * 2); */ + /* ec->comp_data->opaque->w = ec->comp_data->opaque->w + (diff * 2); */ + /* ec->comp_data->opaque->h = ec->comp_data->opaque->h + (diff * 2); */ - /* EINA_RECTANGLE_SET(ec->wl_comp_data->opaque, */ + /* EINA_RECTANGLE_SET(ec->comp_data->opaque, */ /* l, t, pw, ph); */ } @@ -781,7 +780,7 @@ 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; - E_Comp_Wl_Data *cdata; + E_Comp_Data *cdata; E_Binding_Event_Mouse_Button ev; /* get the client for this resource */ @@ -832,7 +831,7 @@ 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; - E_Comp_Wl_Data *cdata; + E_Comp_Data *cdata; E_Binding_Event_Mouse_Button ev; /* DBG("XDG_SHELL: Surface Resize"); */ @@ -939,7 +938,7 @@ _e_xdg_shell_surface_cb_state_change_request(struct wl_client *client EINA_UNUSE return; } - xdg_surface_send_state_change(ec->wl_comp_data->shell.surface, + xdg_surface_send_state_change(ec->comp_data->shell.surface, state, value, serial); } @@ -982,7 +981,7 @@ _e_xdg_shell_surface_cb_state_change_acknowledge(struct wl_client *client EINA_U return; } - xdg_surface_send_configure(ec->wl_comp_data->shell.surface, + xdg_surface_send_configure(ec->comp_data->shell.surface, ec->client.w, ec->client.h); } @@ -1049,8 +1048,8 @@ _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->wl_comp_data->popup.x; - y = ec->parent->client.y + ec->wl_comp_data->popup.y; + x = ec->parent->client.x + ec->comp_data->popup.x; + y = ec->parent->client.y + ec->comp_data->popup.y; } } @@ -1112,7 +1111,7 @@ _e_xdg_shell_surface_activate(struct wl_resource *resource) } if (ec->netwm.type != E_WINDOW_TYPE_POPUP_MENU) - xdg_surface_send_activated(ec->wl_comp_data->shell.surface); + xdg_surface_send_activated(ec->comp_data->shell.surface); } static void @@ -1131,7 +1130,7 @@ _e_xdg_shell_surface_deactivate(struct wl_resource *resource) /* DBG("\tSend XDG Deactivate"); */ if (ec->netwm.type != E_WINDOW_TYPE_POPUP_MENU) - xdg_surface_send_deactivated(ec->wl_comp_data->shell.surface); + xdg_surface_send_deactivated(ec->comp_data->shell.surface); } static void @@ -1150,13 +1149,13 @@ _e_xdg_shell_surface_map(struct wl_resource *resource) return; } - if ((!ec->wl_comp_data->mapped) && (e_pixmap_usable_get(ec->pixmap))) + if ((!ec->comp_data->mapped) && (e_pixmap_usable_get(ec->pixmap))) { /* map this surface if needed */ ec->visible = EINA_TRUE; evas_object_show(ec->frame); evas_object_geometry_set(ec->frame, ec->x, ec->y, ec->w, ec->h); - ec->wl_comp_data->mapped = EINA_TRUE; + ec->comp_data->mapped = EINA_TRUE; /* FIXME: sometimes popup surfaces Do Not raise above their * respective parents... */ @@ -1181,11 +1180,11 @@ _e_xdg_shell_surface_unmap(struct wl_resource *resource) return; } - if (ec->wl_comp_data->mapped) + if (ec->comp_data->mapped) { ec->visible = EINA_FALSE; evas_object_hide(ec->frame); - ec->wl_comp_data->mapped = EINA_FALSE; + ec->comp_data->mapped = EINA_FALSE; } } @@ -1194,7 +1193,7 @@ _e_xdg_shell_cb_surface_get(struct wl_client *client, struct wl_resource *resour { E_Pixmap *ep; E_Client *ec; - E_Comp_Wl_Client_Data *cdata; + E_Comp_Client_Data *cdata; DBG("XDG_SHELL: Surface Get %d", wl_resource_get_id(surface_resource)); @@ -1230,7 +1229,7 @@ _e_xdg_shell_cb_surface_get(struct wl_client *client, struct wl_resource *resour } /* get the client data */ - if (!(cdata = ec->wl_comp_data)) + if (!(cdata = ec->comp_data)) { wl_resource_post_error(surface_resource, WL_DISPLAY_ERROR_INVALID_OBJECT, @@ -1277,7 +1276,7 @@ _e_xdg_shell_cb_surface_get(struct wl_client *client, struct wl_resource *resour ec->border.changed = ec->changes.border = !ec->borderless; ec->changes.icon = !!ec->icccm.class; ec->netwm.type = E_WINDOW_TYPE_NORMAL; - ec->wl_comp_data->set_win_type = EINA_TRUE; + ec->comp_data->set_win_type = EINA_TRUE; EC_CHANGED(ec); } @@ -1289,13 +1288,13 @@ _e_xdg_shell_popup_cb_destroy(struct wl_client *client EINA_UNUSED, struct wl_re /* DBG("XDG_SHELL: Popup Destroy"); */ if ((ec = wl_resource_get_user_data(resource))) { - if (ec->wl_comp_data) + if (ec->comp_data) { - if (ec->wl_comp_data->mapped) + if (ec->comp_data->mapped) { - if ((ec->wl_comp_data->shell.surface) && - (ec->wl_comp_data->shell.unmap)) - ec->wl_comp_data->shell.unmap(ec->wl_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); } if (ec->parent) @@ -1304,8 +1303,8 @@ _e_xdg_shell_popup_cb_destroy(struct wl_client *client EINA_UNUSED, struct wl_re eina_list_remove(ec->parent->transients, ec); } - wl_resource_destroy(ec->wl_comp_data->shell.surface); - ec->wl_comp_data->shell.surface = NULL; + wl_resource_destroy(ec->comp_data->shell.surface); + ec->comp_data->shell.surface = NULL; } } } @@ -1320,7 +1319,7 @@ _e_xdg_shell_cb_popup_get(struct wl_client *client, struct wl_resource *resource { E_Pixmap *ep; E_Client *ec; - E_Comp_Wl_Client_Data *cdata; + E_Comp_Client_Data *cdata; /* DBG("XDG_SHELL: Popup Get"); */ /* DBG("\tSurface: %d", wl_resource_get_id(surface_resource)); */ @@ -1358,7 +1357,7 @@ _e_xdg_shell_cb_popup_get(struct wl_client *client, struct wl_resource *resource } /* get the client data */ - if (!(cdata = ec->wl_comp_data)) + if (!(cdata = ec->comp_data)) { wl_resource_post_error(surface_resource, WL_DISPLAY_ERROR_INVALID_OBJECT, @@ -1406,7 +1405,7 @@ _e_xdg_shell_cb_popup_get(struct wl_client *client, struct wl_resource *resource ec->border.changed = ec->changes.border = !ec->borderless; ec->changes.icon = !!ec->icccm.class; ec->netwm.type = E_WINDOW_TYPE_POPUP_MENU; - ec->wl_comp_data->set_win_type = EINA_TRUE; + ec->comp_data->set_win_type = EINA_TRUE; ec->layer = E_LAYER_CLIENT_POPUP; /* set this client as a transient for parent */ @@ -1441,7 +1440,7 @@ static const struct xdg_shell_interface _e_xdg_shell_interface = static void _e_xdg_shell_cb_unbind(struct wl_resource *resource) { - E_Comp_Wl_Data *cdata; + E_Comp_Data *cdata; if (!(cdata = wl_resource_get_user_data(resource))) return; @@ -1451,7 +1450,7 @@ _e_xdg_shell_cb_unbind(struct wl_resource *resource) 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_Wl_Data *cdata; + E_Comp_Data *cdata; struct wl_resource *res; if (!(res = target)) return 0; @@ -1482,7 +1481,7 @@ _e_xdg_shell_cb_dispatch(const void *implementation EINA_UNUSED, void *target, u static void _e_shell_cb_unbind(struct wl_resource *resource) { - E_Comp_Wl_Data *cdata; + E_Comp_Data *cdata; if (!(cdata = wl_resource_get_user_data(resource))) return; @@ -1492,7 +1491,7 @@ _e_shell_cb_unbind(struct wl_resource *resource) static void _e_shell_cb_bind(struct wl_client *client, void *data, uint32_t version, uint32_t id) { - E_Comp_Wl_Data *cdata; + E_Comp_Data *cdata; struct wl_resource *res; if (!(cdata = data)) @@ -1516,7 +1515,7 @@ _e_shell_cb_bind(struct wl_client *client, void *data, uint32_t version, uint32_ static void _e_xdg_shell_cb_bind(struct wl_client *client, void *data, uint32_t version, uint32_t id) { - E_Comp_Wl_Data *cdata; + E_Comp_Data *cdata; struct wl_resource *res; if (!(cdata = data)) @@ -1542,7 +1541,7 @@ EAPI void * e_modapi_init(E_Module *m) { E_Comp *comp; - E_Comp_Wl_Data *cdata; + E_Comp_Data *cdata; /* try to get the current compositor */ if (!(comp = e_comp_get(NULL))) return NULL; diff --git a/src/modules/wl_drm/e_mod_main.c b/src/modules/wl_drm/e_mod_main.c index 31a7d13d1..173fd97d1 100644 --- a/src/modules/wl_drm/e_mod_main.c +++ b/src/modules/wl_drm/e_mod_main.c @@ -1,6 +1,4 @@ #include "e.h" -#include "e_comp_wl.h" -#include "e_comp_wl_input.h" /* #include */ #define SCREEN_WIDTH 1920 diff --git a/src/modules/wl_fb/e_mod_main.c b/src/modules/wl_fb/e_mod_main.c index b38180ebd..02f6f15e8 100644 --- a/src/modules/wl_fb/e_mod_main.c +++ b/src/modules/wl_fb/e_mod_main.c @@ -1,6 +1,5 @@ #include "e.h" #include -#include "e_comp_wl.h" #include EAPI E_Module_Api e_modapi = { E_MODULE_API_VERSION, "Wl_FB" }; diff --git a/src/modules/wl_x11/e_mod_main.c b/src/modules/wl_x11/e_mod_main.c index a355bb1d5..3a0f28fd1 100644 --- a/src/modules/wl_x11/e_mod_main.c +++ b/src/modules/wl_x11/e_mod_main.c @@ -1,6 +1,4 @@ #include "e.h" -#include "e_comp_wl.h" -#include "e_comp_wl_input.h" #include #define SCREEN_W 1024 @@ -19,7 +17,7 @@ _cb_delete_request(Ecore_Evas *ee EINA_UNUSED) static Eina_Bool _cb_keymap_changed(void *data, int type EINA_UNUSED, void *event EINA_UNUSED) { - E_Comp_Wl_Data *cdata; + E_Comp_Data *cdata; E_Config_XKB_Layout *ekbd; char *rules, *model, *layout; Ecore_X_Atom xkb = 0;