summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Michael <devilhorns@comcast.net>2020-05-18 09:58:43 -0400
committerChristopher Michael <devilhorns@comcast.net>2020-05-18 09:58:43 -0400
commit783e99081999601b13a0bf90e496bfb95957a814 (patch)
tree7a68e07c1c72b0d3661e4712db45c457b8a11f28
parent63b5d81983374838194b6335cc1c7b5ab9db749a (diff)
downloadefl-783e99081999601b13a0bf90e496bfb95957a814.tar.gz
ecore-evas-wayland: Fix formatting according to coding conventions
"80 column code whenever possible - Wrap longer lines where required." NB: No functional changes
-rw-r--r--src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c237
1 files changed, 159 insertions, 78 deletions
diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
index bd1022e3e5..0331c2a56c 100644
--- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
+++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
@@ -140,7 +140,8 @@ _ecore_evas_wl_common_cb_mouse_out(void *data EINA_UNUSED, int type EINA_UNUSED,
ev = event;
ee = ecore_event_window_match((Ecore_Window)ev->window);
if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON;
- if ((Ecore_Window)ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
+ if ((Ecore_Window)ev->window != ee->prop.window)
+ return ECORE_CALLBACK_PASS_ON;
if (!_ecore_evas_mouse_in_check(ee, ev->dev)) return ECORE_CALLBACK_PASS_ON;
ecore_event_evas_seat_modifier_lock_update(ee->evas,
@@ -162,7 +163,8 @@ _ecore_evas_wl_common_cb_focus_in(void *data EINA_UNUSED, int type EINA_UNUSED,
ev = event;
ee = ecore_event_window_match((Ecore_Window)ev->window);
if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON;
- if ((Ecore_Window)ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
+ if ((Ecore_Window)ev->window != ee->prop.window)
+ return ECORE_CALLBACK_PASS_ON;
_ecore_evas_focus_device_set(ee, ev->dev, EINA_TRUE);
return ECORE_CALLBACK_PASS_ON;
}
@@ -178,7 +180,8 @@ _ecore_evas_wl_common_cb_focus_out(void *data EINA_UNUSED, int type EINA_UNUSED,
ev = event;
ee = ecore_event_window_match((Ecore_Window)ev->window);
if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON;
- if ((Ecore_Window)ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
+ if ((Ecore_Window)ev->window != ee->prop.window)
+ return ECORE_CALLBACK_PASS_ON;
_ecore_evas_focus_device_set(ee, ev->dev, EINA_FALSE);
return ECORE_CALLBACK_PASS_ON;
}
@@ -284,9 +287,7 @@ _ecore_evas_wayland_window_update(Ecore_Evas *ee, Ecore_Evas_Engine_Wl_Data *wda
*/
else if (!ee->alpha)
{
- ecore_wl2_window_opaque_region_set(wdata->win,
- 0, 0,
- fullw, fullh);
+ ecore_wl2_window_opaque_region_set(wdata->win, 0, 0, fullw, fullh);
}
/* alpha is set and we might use it, so we'd better clear the
* opaque region, let the compositor blend it all.
@@ -304,9 +305,9 @@ _ecore_evas_wayland_window_update(Ecore_Evas *ee, Ecore_Evas_Engine_Wl_Data *wda
if (!change) return;
if (ECORE_EVAS_PORTRAIT(ee))
- evas_damage_rectangle_add(ee->evas, 0, 0, fullw, fullh);
+ evas_damage_rectangle_add(ee->evas, 0, 0, fullw, fullh);
else
- evas_damage_rectangle_add(ee->evas, 0, 0, fullh, fullw);
+ evas_damage_rectangle_add(ee->evas, 0, 0, fullh, fullw);
ee->shadow.changed = EINA_FALSE;
}
@@ -337,25 +338,33 @@ _ecore_evas_wl_common_resize(Ecore_Evas *ee, int w, int h)
ee->w = w;
ee->h = h;
- if (wdata->win->xdg_set_min_size && wdata->win->xdg_toplevel && wdata->win->pending.min)
+ if (wdata->win->xdg_set_min_size && wdata->win->xdg_toplevel &&
+ wdata->win->pending.min)
{
- wdata->win->xdg_set_min_size(wdata->win->xdg_toplevel, ee->prop.min.w + fw, ee->prop.min.h + fh);
+ wdata->win->xdg_set_min_size(wdata->win->xdg_toplevel,
+ ee->prop.min.w + fw, ee->prop.min.h + fh);
wdata->win->pending.min = 0;
}
- if (wdata->win->xdg_set_max_size && wdata->win->xdg_toplevel && wdata->win->pending.max)
+ if (wdata->win->xdg_set_max_size && wdata->win->xdg_toplevel &&
+ wdata->win->pending.max)
{
- wdata->win->xdg_set_max_size(wdata->win->xdg_toplevel, ee->prop.max.w + fw, ee->prop.max.h + fh);
+ wdata->win->xdg_set_max_size(wdata->win->xdg_toplevel,
+ ee->prop.max.w + fw, ee->prop.max.h + fh);
wdata->win->pending.max = 0;
}
- if (wdata->win->zxdg_set_min_size && wdata->win->zxdg_toplevel && wdata->win->pending.min)
+ if (wdata->win->zxdg_set_min_size && wdata->win->zxdg_toplevel &&
+ wdata->win->pending.min)
{
- wdata->win->zxdg_set_min_size(wdata->win->zxdg_toplevel, ee->prop.min.w + fw, ee->prop.min.h + fh);
+ wdata->win->zxdg_set_min_size(wdata->win->zxdg_toplevel,
+ ee->prop.min.w + fw, ee->prop.min.h + fh);
wdata->win->pending.min = 0;
}
- if (wdata->win->zxdg_set_max_size && wdata->win->zxdg_toplevel && wdata->win->pending.max)
+ if (wdata->win->zxdg_set_max_size && wdata->win->zxdg_toplevel &&
+ wdata->win->pending.max)
{
- wdata->win->zxdg_set_max_size(wdata->win->zxdg_toplevel, ee->prop.max.w + fw, ee->prop.max.h + fh);
+ wdata->win->zxdg_set_max_size(wdata->win->zxdg_toplevel,
+ ee->prop.max.w + fw, ee->prop.max.h + fh);
wdata->win->pending.max = 0;
}
@@ -390,7 +399,8 @@ _ecore_evas_wl_common_resize(Ecore_Evas *ee, int w, int h)
h = (bh + (((h - bh) / ee->prop.step.h) * ee->prop.step.h));
}
- if (!wdata->win->display->wl.efl_hints && EINA_DBL_NONZERO(ee->prop.aspect))
+ if (!wdata->win->display->wl.efl_hints &&
+ EINA_DBL_NONZERO(ee->prop.aspect))
{
/* copied from e_client.c */
Evas_Aspect_Control aspect;
@@ -458,9 +468,9 @@ _ecore_evas_wl_common_resize(Ecore_Evas *ee, int w, int h)
}
if (ECORE_EVAS_PORTRAIT(ee))
- evas_output_size_get(ee->evas, &ow, &oh);
+ evas_output_size_get(ee->evas, &ow, &oh);
else
- evas_output_size_get(ee->evas, &oh, &ow);
+ evas_output_size_get(ee->evas, &oh, &ow);
if (ECORE_EVAS_PORTRAIT(ee) && ((ow != w) || (oh != h)))
diff = 1;
@@ -584,9 +594,11 @@ _ecore_evas_wl_common_cb_window_configure(void *data EINA_UNUSED, int type EINA_
prev_max = ee->prop.maximized;
prev_full = ee->prop.fullscreen;
ee->prop.maximized =
- (ev->states & ECORE_WL2_WINDOW_STATE_MAXIMIZED) == ECORE_WL2_WINDOW_STATE_MAXIMIZED;
+ (ev->states & ECORE_WL2_WINDOW_STATE_MAXIMIZED) ==
+ ECORE_WL2_WINDOW_STATE_MAXIMIZED;
ee->prop.fullscreen =
- (ev->states & ECORE_WL2_WINDOW_STATE_FULLSCREEN) == ECORE_WL2_WINDOW_STATE_FULLSCREEN;
+ (ev->states & ECORE_WL2_WINDOW_STATE_FULLSCREEN) ==
+ ECORE_WL2_WINDOW_STATE_FULLSCREEN;
active = wdata->activated;
wdata->activated = ecore_wl2_window_activated_get(wdata->win);
@@ -750,8 +762,10 @@ _ecore_evas_wl_common_cb_aux_hint_supported(void *data EINA_UNUSED, int type EI
if (!ee) return ECORE_CALLBACK_PASS_ON;
if ((Ecore_Window)ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
wdata = ee->engine.data;
- EINA_LIST_FREE(ee->prop.aux_hint.supported_list, hint) eina_stringshare_del(hint);
- ee->prop.aux_hint.supported_list = ecore_wl2_window_aux_hints_supported_get(wdata->win);
+ EINA_LIST_FREE(ee->prop.aux_hint.supported_list, hint)
+ eina_stringshare_del(hint);
+ ee->prop.aux_hint.supported_list =
+ ecore_wl2_window_aux_hints_supported_get(wdata->win);
return ECORE_CALLBACK_RENEW;
}
@@ -963,7 +977,8 @@ _ecore_evas_wl_common_cb_www_drag(void *d EINA_UNUSED, int t EINA_UNUSED, void *
ee = ecore_event_window_match((Ecore_Window)ev->window);
if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON;
- if ((Ecore_Window)ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
+ if ((Ecore_Window)ev->window != ee->prop.window)
+ return ECORE_CALLBACK_PASS_ON;
wdata = ee->engine.data;
wdata->dragging = !!ev->dragging;
@@ -981,7 +996,8 @@ _ecore_evas_wl_common_cb_www(void *d EINA_UNUSED, int t EINA_UNUSED, void *event
ee = ecore_event_window_match((Ecore_Window)ev->window);
if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON;
- if ((Ecore_Window)ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
+ if ((Ecore_Window)ev->window != ee->prop.window)
+ return ECORE_CALLBACK_PASS_ON;
wdata = ee->engine.data;
wdata->x_rel += ev->x_rel;
@@ -1060,7 +1076,7 @@ _ecore_evas_wl_common_cb_global_added(void *d EINA_UNUSED, int t EINA_UNUSED, vo
EE_Wl_Device *device;
if ((!ev->interface) || (strcmp(ev->interface, "wl_seat")))
- return ECORE_CALLBACK_PASS_ON;
+ return ECORE_CALLBACK_PASS_ON;
EINA_LIST_FOREACH(ee_list, l, ee)
{
@@ -1109,7 +1125,7 @@ _ecore_evas_wl_common_cb_global_removed(void *d EINA_UNUSED, int t EINA_UNUSED,
Eina_List *l, *ll;
if ((!ev->interface) || (strcmp(ev->interface, "wl_seat")))
- return ECORE_CALLBACK_PASS_ON;
+ return ECORE_CALLBACK_PASS_ON;
EINA_LIST_FOREACH(ee_list, l, ee)
{
@@ -1438,7 +1454,7 @@ _ecore_evas_wl_common_free(Ecore_Evas *ee)
ecore_wl2_display_disconnect(wdata->display);
EINA_LIST_FREE(wdata->devices_list, device)
- free(device);
+ free(device);
free(wdata);
@@ -1517,7 +1533,9 @@ _ecore_evas_wl_common_pointer_xy_get(const Ecore_Evas *ee, Evas_Coord *x, Evas_C
LOGFN;
wdata = ee->engine.data;
- input = ecore_wl2_display_input_find_by_name(ecore_wl2_window_display_get(wdata->win), "default");
+ input =
+ ecore_wl2_display_input_find_by_name
+ (ecore_wl2_window_display_get(wdata->win), "default");
if (input) ecore_wl2_input_pointer_xy_get(input, x, y);
}
@@ -1594,7 +1612,9 @@ _ecore_evas_wl_common_pointer_device_xy_get(const Ecore_Evas *ee, const Efl_Inpu
wdata = ee->engine.data;
seat = evas_device_parent_get(pointer);
EINA_SAFETY_ON_NULL_RETURN(seat);
- input = ecore_wl2_display_input_find(ecore_wl2_window_display_get(wdata->win), evas_device_seat_id_get(seat));
+ input =
+ ecore_wl2_display_input_find
+ (ecore_wl2_window_display_get(wdata->win), evas_device_seat_id_get(seat));
EINA_SAFETY_ON_NULL_RETURN(input);
ecore_wl2_input_pointer_xy_get(input, x, y);
}
@@ -1608,7 +1628,8 @@ _ecore_evas_wl_common_aux_hints_supported_update(Ecore_Evas *ee)
if (!ee) return;
wdata = ee->engine.data;
- ee->prop.aux_hint.supported_list = ecore_wl2_window_aux_hints_supported_get(wdata->win);
+ ee->prop.aux_hint.supported_list =
+ ecore_wl2_window_aux_hints_supported_get(wdata->win);
}
static void
@@ -1776,7 +1797,9 @@ _ecore_evas_wl_common_object_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int la
wdata = ee->engine.data;
if (obj == _ecore_evas_default_cursor_image_get(ee)) return;
- input = ecore_wl2_display_input_find_by_name(ecore_wl2_window_display_get(wdata->win), "default");
+ input =
+ ecore_wl2_display_input_find_by_name
+ (ecore_wl2_window_display_get(wdata->win), "default");
if (input) ecore_wl2_input_pointer_set(input, NULL, hot_x, hot_y);
}
@@ -2146,24 +2169,36 @@ _ecore_evas_wl_common_show(Ecore_Evas *ee)
int fw, fh;
evas_output_framespace_get(ee->evas, NULL, NULL, &fw, &fh);
- if (wdata->win->xdg_set_min_size && wdata->win->xdg_toplevel && wdata->win->pending.min)
+ if (wdata->win->xdg_set_min_size && wdata->win->xdg_toplevel &&
+ wdata->win->pending.min)
{
- wdata->win->xdg_set_min_size(wdata->win->xdg_toplevel, ee->prop.min.w + fw, ee->prop.min.h + fh);
+ wdata->win->xdg_set_min_size(wdata->win->xdg_toplevel,
+ ee->prop.min.w + fw,
+ ee->prop.min.h + fh);
wdata->win->pending.min = 0;
}
- if (wdata->win->xdg_set_max_size && wdata->win->xdg_toplevel && wdata->win->pending.max)
+ if (wdata->win->xdg_set_max_size && wdata->win->xdg_toplevel &&
+ wdata->win->pending.max)
{
- wdata->win->xdg_set_max_size(wdata->win->xdg_toplevel, ee->prop.max.w + fw, ee->prop.max.h + fh);
+ wdata->win->xdg_set_max_size(wdata->win->xdg_toplevel,
+ ee->prop.max.w + fw,
+ ee->prop.max.h + fh);
wdata->win->pending.max = 0;
}
- if (wdata->win->zxdg_set_min_size && wdata->win->zxdg_toplevel && wdata->win->pending.min)
+ if (wdata->win->zxdg_set_min_size && wdata->win->zxdg_toplevel &&
+ wdata->win->pending.min)
{
- wdata->win->zxdg_set_min_size(wdata->win->zxdg_toplevel, ee->prop.min.w + fw, ee->prop.min.h + fh);
+ wdata->win->zxdg_set_min_size(wdata->win->zxdg_toplevel,
+ ee->prop.min.w + fw,
+ ee->prop.min.h + fh);
wdata->win->pending.min = 0;
}
- if (wdata->win->zxdg_set_max_size && wdata->win->zxdg_toplevel && wdata->win->pending.max)
+ if (wdata->win->zxdg_set_max_size && wdata->win->zxdg_toplevel &&
+ wdata->win->pending.max)
{
- wdata->win->zxdg_set_max_size(wdata->win->zxdg_toplevel, ee->prop.max.w + fw, ee->prop.max.h + fh);
+ wdata->win->zxdg_set_max_size(wdata->win->zxdg_toplevel,
+ ee->prop.max.w + fw,
+ ee->prop.max.h + fh);
wdata->win->pending.max = 0;
}
@@ -2382,15 +2417,20 @@ static void
_reeval_seat(unsigned int *seat, Ecore_Evas *ee)
{
if (*seat == 0)
- *seat = evas_device_seat_id_get(evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_TYPE_SEAT));
+ {
+ *seat =
+ evas_device_seat_id_get(evas_default_device_get
+ (ee->evas, EFL_INPUT_DEVICE_TYPE_SEAT));
+ }
}
static inline void
_clear_selection(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Selection_Buffer selection)
{
Ecore_Evas_Engine_Wl_Data *edata = ee->engine.data;
- Ecore_Evas_Selection_Callbacks *cbs = &edata->selection_data[selection].callbacks;
+ Ecore_Evas_Selection_Callbacks *cbs;
+ cbs = &edata->selection_data[selection].callbacks;
EINA_SAFETY_ON_FALSE_RETURN(cbs->cancel);
cbs->cancel(ee, seat, selection);
@@ -2435,7 +2475,8 @@ _ecore_evas_wl_selection_claim(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Sel
if (selection == ECORE_EVAS_SELECTION_BUFFER_SELECTION_BUFFER)
{
- _store_selection_cbs(ee, seat, selection, available_types, delivery, cancel);
+ _store_selection_cbs(ee, seat, selection, available_types,
+ delivery, cancel);
return EINA_TRUE;
}
@@ -2448,7 +2489,9 @@ _ecore_evas_wl_selection_claim(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_Sel
}
tmp_array[eina_array_count(available_types)] = NULL;
- data->sent_serial = ecore_wl2_dnd_selection_set(_fetch_input(ee, seat), (const char**)tmp_array);
+ data->sent_serial =
+ ecore_wl2_dnd_selection_set(_fetch_input(ee, seat),
+ (const char**)tmp_array);
return EINA_TRUE;
}
@@ -2497,7 +2540,11 @@ _ecore_evas_wl_selection_request(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_S
char *available_type = eina_array_data_get(available_types, i);
for (unsigned int j = 0; j < eina_array_count(acceptable_types) && !selected_type; ++j)
{
- char *acceptable_type = eina_array_data_get(acceptable_types, j);
+ Eina_Iterator *convertions;
+ const char *convert_available_type;
+ char *acceptable_type;
+
+ acceptable_type = eina_array_data_get(acceptable_types, j);
if (eina_streq(acceptable_type, available_type))
{
selected_type = available_type;
@@ -2505,8 +2552,9 @@ _ecore_evas_wl_selection_request(Ecore_Evas *ee, unsigned int seat, Ecore_Evas_S
break;
}
- const char *convert_available_type;
- Eina_Iterator *convertions = eina_content_converter_possible_conversions(available_type);
+ convertions =
+ eina_content_converter_possible_conversions(available_type);
+
EINA_ITERATOR_FOREACH(convertions, convert_available_type)
{
if (eina_streq(convert_available_type, acceptable_type))
@@ -2568,12 +2616,16 @@ _wl_selection_changed(void *data, int type EINA_UNUSED, void *event EINA_UNUSED)
return ECORE_CALLBACK_PASS_ON;
if (ee->func.fn_selection_changed)
- ee->func.fn_selection_changed(ee, 0, ECORE_EVAS_SELECTION_BUFFER_COPY_AND_PASTE_BUFFER);
+ {
+ ee->func.fn_selection_changed
+ (ee, 0, ECORE_EVAS_SELECTION_BUFFER_COPY_AND_PASTE_BUFFER);
+ }
return ECORE_CALLBACK_PASS_ON;
}
-typedef struct {
+typedef struct
+{
Eina_Rw_Slice slice;
unsigned int written_bytes;
} Delayed_Writing;
@@ -2634,8 +2686,11 @@ _wl_interaction_send(void *data, int type EINA_UNUSED, void *event)
selection = &wdata->selection_data[buffer];
EINA_SAFETY_ON_NULL_GOTO(selection, end);
EINA_SAFETY_ON_NULL_GOTO(selection->callbacks.delivery, end);
- EINA_SAFETY_ON_FALSE_GOTO(selection->callbacks.delivery(ee, ev->seat, buffer, ev->type, &forign_slice->slice), end);
- ecore_main_fd_handler_add(ev->fd, ECORE_FD_WRITE, _write_to_fd, forign_slice, NULL, NULL);
+ EINA_SAFETY_ON_FALSE_GOTO(selection->callbacks.delivery
+ (ee, ev->seat, buffer, ev->type,
+ &forign_slice->slice), end);
+ ecore_main_fd_handler_add(ev->fd, ECORE_FD_WRITE, _write_to_fd,
+ forign_slice, NULL, NULL);
return ECORE_CALLBACK_PASS_ON;
@@ -2671,7 +2726,8 @@ _wl_selection_receive(void *data, int type EINA_UNUSED, void *event)
{
//ensure that we always have a \0 at the end, there is no assertion that \0 is included here.
slice.len = ready->len + 1;
- slice.mem = eina_memdup((unsigned char*)ready->data, ready->len, EINA_TRUE);
+ slice.mem =
+ eina_memdup((unsigned char*)ready->data, ready->len, EINA_TRUE);
}
else
{
@@ -2683,13 +2739,16 @@ _wl_selection_receive(void *data, int type EINA_UNUSED, void *event)
if (wdata->selection_data[selection].later_convert)
{
- Eina_Content *tmp = eina_content_convert(content, wdata->selection_data[selection].later_convert);
+ Eina_Content *tmp;
+
+ tmp = eina_content_convert(content, wdata->selection_data[selection].later_convert);
wdata->selection_data[selection].later_convert = NULL;
eina_content_free(content);
content = tmp;
}
- eina_promise_resolve(wdata->selection_data[selection].delivery, eina_value_content_init(content));
+ eina_promise_resolve(wdata->selection_data[selection].delivery,
+ eina_value_content_init(content));
wdata->selection_data[selection].delivery = NULL;
eina_content_free(content);
@@ -2708,8 +2767,10 @@ _wl_selection_dnd_leave(void *data, int type EINA_UNUSED, void *event)
if (ee->prop.window != (Ecore_Window)ev->win) return ECORE_CALLBACK_PASS_ON;
//evas_output_framespace_get(ee->evas, &fpos.x, &fpos.y, NULL, NULL);
- ecore_wl2_input_pointer_xy_get(ecore_wl2_display_input_find(ev->display, ev->seat), &cpos.x, &cpos.y);
- ecore_evas_dnd_leave(data, ev->seat, EINA_POSITION2D(cpos.x - fpos.x, cpos.y - fpos.y));
+ ecore_wl2_input_pointer_xy_get(ecore_wl2_display_input_find
+ (ev->display, ev->seat), &cpos.x, &cpos.y);
+ ecore_evas_dnd_leave(data, ev->seat, EINA_POSITION2D(cpos.x - fpos.x,
+ cpos.y - fpos.y));
wdata->external_offer = NULL;
return ECORE_CALLBACK_PASS_ON;
@@ -2725,7 +2786,8 @@ _wl_selection_dnd_motion(void *data, int type EINA_UNUSED, void *event)
if (ee->prop.window != (Ecore_Window)ev->win) return ECORE_CALLBACK_PASS_ON;
evas_output_framespace_get(ee->evas, &fpos.x, &fpos.y, NULL, NULL);
- ecore_evas_dnd_position_set(data, ev->seat, EINA_POSITION2D(ev->x - fpos.x, ev->y - fpos.y));
+ ecore_evas_dnd_position_set(data, ev->seat,
+ EINA_POSITION2D(ev->x - fpos.x, ev->y - fpos.y));
return ECORE_CALLBACK_PASS_ON;
}
static Eina_Bool
@@ -2739,7 +2801,10 @@ _wl_selection_dnd_enter(void *data, int type EINA_UNUSED, void *event)
if (ee->prop.window != (Ecore_Window)ev->win) return ECORE_CALLBACK_PASS_ON;
evas_output_framespace_get(ee->evas, &fpos.x, &fpos.y, NULL, NULL);
- ecore_evas_dnd_enter(data, ev->seat, eina_array_iterator_new(ecore_wl2_offer_mimes_get(ev->offer)), EINA_POSITION2D(ev->x - fpos.x, ev->y - fpos.y));
+ ecore_evas_dnd_enter(data, ev->seat,
+ eina_array_iterator_new
+ (ecore_wl2_offer_mimes_get(ev->offer)),
+ EINA_POSITION2D(ev->x - fpos.x, ev->y - fpos.y));
ecore_wl2_offer_mimes_set(ev->offer, ecore_wl2_offer_mimes_get(ev->offer));
wdata->external_offer = ev->offer;
return ECORE_CALLBACK_PASS_ON;
@@ -2755,7 +2820,10 @@ _wl_selection_dnd_drop(void *data, int type EINA_UNUSED, void *event)
wdata = ee->engine.data;
if (ee->func.fn_dnd_drop)
- ee->func.fn_dnd_drop(ee, ev->seat, ecore_evas_dnd_pos_get(ee, ev->seat), "ask");
+ {
+ ee->func.fn_dnd_drop(ee, ev->seat,
+ ecore_evas_dnd_pos_get(ee, ev->seat), "ask");
+ }
ecore_wl2_dnd_drag_end(_fetch_input(ee, ev->seat));
wdata->external_offer = NULL;
@@ -2784,22 +2852,30 @@ _ecore_evas_wl_selection_init(Ecore_Evas *ee)
{
Ecore_Evas_Engine_Wl_Data *wdata = ee->engine.data;
- wdata->changed_handler = ecore_event_handler_add(ECORE_WL2_EVENT_SEAT_SELECTION,
- _wl_selection_changed, ee);
- wdata->send_handler = ecore_event_handler_add(ECORE_WL2_EVENT_DATA_SOURCE_SEND,
- _wl_interaction_send, ee);
- wdata->offer_handler = ecore_event_handler_add(ECORE_WL2_EVENT_OFFER_DATA_READY,
- _wl_selection_receive, ee);
- wdata->dnd_leave_handler = ecore_event_handler_add(ECORE_WL2_EVENT_DND_LEAVE,
- _wl_selection_dnd_leave, ee);
- wdata->dnd_motion_handler = ecore_event_handler_add(ECORE_WL2_EVENT_DND_MOTION,
- _wl_selection_dnd_motion, ee);
- wdata->dnd_enter_handler = ecore_event_handler_add(ECORE_WL2_EVENT_DND_ENTER,
- _wl_selection_dnd_enter, ee);
- wdata->dnd_drop_handler = ecore_event_handler_add(ECORE_WL2_EVENT_DND_DROP,
- _wl_selection_dnd_drop, ee);
- wdata->dnd_end_handler = ecore_event_handler_add(ECORE_WL2_EVENT_DATA_SOURCE_DROP,
- _wl_selection_dnd_end, ee);
+ wdata->changed_handler =
+ ecore_event_handler_add(ECORE_WL2_EVENT_SEAT_SELECTION,
+ _wl_selection_changed, ee);
+ wdata->send_handler =
+ ecore_event_handler_add(ECORE_WL2_EVENT_DATA_SOURCE_SEND,
+ _wl_interaction_send, ee);
+ wdata->offer_handler =
+ ecore_event_handler_add(ECORE_WL2_EVENT_OFFER_DATA_READY,
+ _wl_selection_receive, ee);
+ wdata->dnd_leave_handler =
+ ecore_event_handler_add(ECORE_WL2_EVENT_DND_LEAVE,
+ _wl_selection_dnd_leave, ee);
+ wdata->dnd_motion_handler =
+ ecore_event_handler_add(ECORE_WL2_EVENT_DND_MOTION,
+ _wl_selection_dnd_motion, ee);
+ wdata->dnd_enter_handler =
+ ecore_event_handler_add(ECORE_WL2_EVENT_DND_ENTER,
+ _wl_selection_dnd_enter, ee);
+ wdata->dnd_drop_handler =
+ ecore_event_handler_add(ECORE_WL2_EVENT_DND_DROP,
+ _wl_selection_dnd_drop, ee);
+ wdata->dnd_end_handler =
+ ecore_event_handler_add(ECORE_WL2_EVENT_DATA_SOURCE_DROP,
+ _wl_selection_dnd_end, ee);
for (int i = 0; i < ECORE_EVAS_SELECTION_BUFFER_LAST; ++i)
{
wdata->selection_data[i].callbacks.available_types = NULL;
@@ -2815,7 +2891,8 @@ _ecore_evas_wl_dnd_start(Ecore_Evas *ee, unsigned int seat, Eina_Array *availabl
const char *tmp_array[eina_array_count(available_types) + 1];
_reeval_seat(&seat, ee);
- _store_selection_cbs(ee, seat, ECORE_EVAS_SELECTION_BUFFER_DRAG_AND_DROP_BUFFER, available_types, delivery, cancel);
+ _store_selection_cbs(ee, seat, ECORE_EVAS_SELECTION_BUFFER_DRAG_AND_DROP_BUFFER,
+ available_types, delivery, cancel);
for (unsigned int i = 0; i < eina_array_count(available_types); ++i)
{
@@ -2823,9 +2900,13 @@ _ecore_evas_wl_dnd_start(Ecore_Evas *ee, unsigned int seat, Eina_Array *availabl
}
tmp_array[eina_array_count(available_types)] = NULL;
- ecore_wl2_dnd_drag_types_set(_fetch_input(ee, seat), (const char**)tmp_array);
+ ecore_wl2_dnd_drag_types_set(_fetch_input(ee, seat),
+ (const char**)tmp_array);
wdata->selection_data[ECORE_EVAS_SELECTION_BUFFER_DRAG_AND_DROP_BUFFER].sent_serial =
- ecore_wl2_dnd_drag_start(_fetch_input(ee, seat), _ecore_evas_wayland_window_get(ee), _ecore_evas_wayland_window_get(drag_rep));
+ ecore_wl2_dnd_drag_start(_fetch_input(ee, seat),
+ _ecore_evas_wayland_window_get(ee),
+ _ecore_evas_wayland_window_get(drag_rep));
+
return EINA_TRUE;
}