summaryrefslogtreecommitdiff
path: root/src/modules/ecore_evas
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2017-08-08 10:00:11 -0400
committerChris Michael <cp.michael@samsung.com>2017-08-08 10:00:11 -0400
commit4cf448274c631b6aa756ff6f83f355c41922e01a (patch)
tree614a96c265a185711acc6d960ee340b66a826482 /src/modules/ecore_evas
parent42b082fe36d9888864356666ba77e8f46fa99657 (diff)
ecore-evas-wayland: Add handler for Iconify State Change event
Small patch to add a handler for catching Window Iconify State Change events '#divergence' @feature Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/modules/ecore_evas')
-rw-r--r--src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c27
1 files changed, 25 insertions, 2 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 c7a3206..970c5f3 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[20]; 31static Ecore_Event_Handler *_ecore_evas_wl_event_hdls[17];
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);
@@ -588,7 +588,7 @@ _ecore_evas_wl_common_cb_aux_hint_allowed(void *data EINA_UNUSED, int type EINA
588 { 588 {
589 _ecore_evas_wl_common_state_update(ee); 589 _ecore_evas_wl_common_state_update(ee);
590 aux->notified = 1; 590 aux->notified = 1;
591 } 591 }
592 break; 592 break;
593 } 593 }
594 } 594 }
@@ -1080,6 +1080,26 @@ _ecore_evas_wl_common_cb_seat_capabilities_changed(void *d EINA_UNUSED, int t EI
1080 return ECORE_CALLBACK_PASS_ON; 1080 return ECORE_CALLBACK_PASS_ON;
1081} 1081}
1082 1082
1083static Eina_Bool
1084_ecore_evas_wl_common_cb_iconify_state_change(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
1085{
1086 Ecore_Evas *ee;
1087 Ecore_Wl2_Event_Window_Iconify_State_Change *ev;
1088
1089 ev = event;
1090 ee = ecore_event_window_match(ev->win);
1091 if (!ee) return ECORE_CALLBACK_PASS_ON;
1092 if (!ev->force) return ECORE_CALLBACK_PASS_ON;
1093 if (ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
1094
1095 if (ee->prop.iconified == ev->iconified)
1096 return ECORE_CALLBACK_PASS_ON;
1097
1098 ee->prop.iconified = ev->iconified;
1099 _ecore_evas_wl_common_state_update(ee);
1100 return ECORE_CALLBACK_PASS_ON;
1101}
1102
1083static int 1103static int
1084_ecore_evas_wl_common_init(void) 1104_ecore_evas_wl_common_init(void)
1085{ 1105{
@@ -1138,6 +1158,9 @@ _ecore_evas_wl_common_init(void)
1138 _ecore_evas_wl_event_hdls[15] = 1158 _ecore_evas_wl_event_hdls[15] =
1139 ecore_event_handler_add(ECORE_WL2_EVENT_AUX_HINT_SUPPORTED, 1159 ecore_event_handler_add(ECORE_WL2_EVENT_AUX_HINT_SUPPORTED,
1140 _ecore_evas_wl_common_cb_aux_hint_supported, NULL); 1160 _ecore_evas_wl_common_cb_aux_hint_supported, NULL);
1161 _ecore_evas_wl_event_hdls[16] =
1162 ecore_event_handler_add(ECORE_WL2_EVENT_WINDOW_ICONIFY_STATE_CHANGE,
1163 _ecore_evas_wl_common_cb_iconify_state_change, NULL);
1141 1164
1142 ecore_event_evas_init(); 1165 ecore_event_evas_init();
1143 1166