summaryrefslogtreecommitdiff
path: root/src/modules/ecore_evas
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2017-07-28 15:44:43 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2017-07-28 15:43:48 -0400
commit6bb56b3f5651fab85b1a0a1a1a8040f4e488c799 (patch)
treee0f3505bdf79022a9085c700f6e2e4f8a51360bc /src/modules/ecore_evas
parent6dc937d26c6bcddb42193907207b84ae1953a04c (diff)
ecore-wl2: implement support for aux hints
this is a direct copy of a feature from tizen git with no modifications other than what was required for compilation and functionality https://review.tizen.org/git/?p=platform/upstream/efl.git;a=commitdiff_plain;h=01e72b7e3484ece4b589f95315990ba2c366c231 https://review.tizen.org/git/?p=platform/upstream/efl.git;a=commitdiff;h=670d84b579f248ae0e3df48e9953fe8128da9468 fix T5780 @feature
Diffstat (limited to 'src/modules/ecore_evas')
-rw-r--r--src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c67
1 files changed, 66 insertions, 1 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 396ca75..df0a6ba 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
@@ -28,7 +28,7 @@ struct _EE_Wl_Device
28 28
29/* local variables */ 29/* local variables */
30static int _ecore_evas_wl_init_count = 0; 30static int _ecore_evas_wl_init_count = 0;
31static Ecore_Event_Handler *_ecore_evas_wl_event_hdls[14]; 31static Ecore_Event_Handler *_ecore_evas_wl_event_hdls[20];
32 32
33static void _ecore_evas_wayland_resize(Ecore_Evas *ee, int location); 33static void _ecore_evas_wayland_resize(Ecore_Evas *ee, int location);
34static void _ecore_evas_wl_common_rotation_set(Ecore_Evas *ee, int rotation, int resize); 34static void _ecore_evas_wl_common_rotation_set(Ecore_Evas *ee, int rotation, int resize);
@@ -543,6 +543,53 @@ _ecore_evas_wl_common_cb_window_configure_complete(void *data EINA_UNUSED, int t
543 return ECORE_CALLBACK_PASS_ON; 543 return ECORE_CALLBACK_PASS_ON;
544} 544}
545 545
546 static Eina_Bool
547_ecore_evas_wl_common_cb_aux_hint_supported(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
548{
549 Ecore_Evas *ee;
550 Ecore_Wl2_Event_Aux_Hint_Supported *ev;
551 Eina_Stringshare *hint;
552 Ecore_Evas_Engine_Wl_Data *wdata;
553
554 ev = event;
555 ee = ecore_event_window_match(ev->win);
556 if (!ee) return ECORE_CALLBACK_PASS_ON;
557 if (ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
558 wdata = ee->engine.data;
559 EINA_LIST_FREE(ee->prop.aux_hint.supported_list, hint) eina_stringshare_del(hint);
560 ee->prop.aux_hint.supported_list = ecore_wl2_window_aux_hints_supported_get(wdata->win);
561 return ECORE_CALLBACK_RENEW;
562}
563
564 static Eina_Bool
565_ecore_evas_wl_common_cb_aux_hint_allowed(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
566{
567 Ecore_Evas *ee;
568 Ecore_Wl2_Event_Aux_Hint_Allowed *ev;
569 Eina_List *l;
570 Ecore_Evas_Aux_Hint *aux;
571
572 ev = event;
573 ee = ecore_event_window_match(ev->win);
574 if (!ee) return ECORE_CALLBACK_PASS_ON;
575 if (ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
576
577 EINA_LIST_FOREACH(ee->prop.aux_hint.hints, l, aux)
578 {
579 if (aux->id == ev->id)
580 {
581 aux->allowed = 1;
582 if (!aux->notified)
583 {
584 _ecore_evas_wl_common_state_update(ee);
585 aux->notified = 1;
586 }
587 break;
588 }
589 }
590 return ECORE_CALLBACK_PASS_ON;
591}
592
546static Eina_Bool 593static Eina_Bool
547_ecore_evas_wl_common_cb_window_rotate(void *data EINA_UNUSED, int type EINA_UNUSED, void *event) 594_ecore_evas_wl_common_cb_window_rotate(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
548{ 595{
@@ -1080,6 +1127,12 @@ _ecore_evas_wl_common_init(void)
1080 _ecore_evas_wl_event_hdls[13] = 1127 _ecore_evas_wl_event_hdls[13] =
1081 ecore_event_handler_add(ECORE_WL2_EVENT_WINDOW_ROTATE, 1128 ecore_event_handler_add(ECORE_WL2_EVENT_WINDOW_ROTATE,
1082 _ecore_evas_wl_common_cb_window_rotate, NULL); 1129 _ecore_evas_wl_common_cb_window_rotate, NULL);
1130 _ecore_evas_wl_event_hdls[14] =
1131 ecore_event_handler_add(ECORE_WL2_EVENT_AUX_HINT_ALLOWED,
1132 _ecore_evas_wl_common_cb_aux_hint_allowed, NULL);
1133 _ecore_evas_wl_event_hdls[15] =
1134 ecore_event_handler_add(ECORE_WL2_EVENT_AUX_HINT_SUPPORTED,
1135 _ecore_evas_wl_common_cb_aux_hint_supported, NULL);
1083 1136
1084 ecore_event_evas_init(); 1137 ecore_event_evas_init();
1085 1138
@@ -1309,6 +1362,18 @@ _ecore_evas_wl_common_pointer_device_xy_get(const Ecore_Evas *ee, const Efl_Inpu
1309 ecore_wl2_input_pointer_xy_get(input, x, y); 1362 ecore_wl2_input_pointer_xy_get(input, x, y);
1310} 1363}
1311 1364
1365 void
1366_ecore_evas_wl_common_aux_hints_supported_update(Ecore_Evas *ee)
1367{
1368 Ecore_Evas_Engine_Wl_Data *wdata;
1369
1370 LOGFN(__FILE__, __LINE__, __FUNCTION__);
1371
1372 if (!ee) return;
1373 wdata = ee->engine.data;
1374 ee->prop.aux_hint.supported_list = ecore_wl2_window_aux_hints_supported_get(wdata->win);
1375}
1376
1312static void 1377static void
1313_ecore_evas_wl_common_raise(Ecore_Evas *ee) 1378_ecore_evas_wl_common_raise(Ecore_Evas *ee)
1314{ 1379{