summaryrefslogtreecommitdiff
path: root/src/lib/ecore_evas/ecore_evas_buffer.c
diff options
context:
space:
mode:
authorGuilherme Iscaro <iscaro@profusion.mobi>2016-11-03 12:07:40 -0200
committerBruno Dilly <bdilly@profusion.mobi>2016-11-28 13:57:55 -0200
commitbe609118c6a23a80e5a3271a6294621baa3e480a (patch)
tree20ef9378b6cbf69d1f4fea2b4ca5e67cdb209a01 /src/lib/ecore_evas/ecore_evas_buffer.c
parent6b95c4c2eccff5976992b9a4d557e586d90511d1 (diff)
Ecore_Evas: Add support for per-seat focus.
Diffstat (limited to 'src/lib/ecore_evas/ecore_evas_buffer.c')
-rw-r--r--src/lib/ecore_evas/ecore_evas_buffer.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/src/lib/ecore_evas/ecore_evas_buffer.c b/src/lib/ecore_evas/ecore_evas_buffer.c
index deb2387001..ae9fb62646 100644
--- a/src/lib/ecore_evas/ecore_evas_buffer.c
+++ b/src/lib/ecore_evas/ecore_evas_buffer.c
@@ -105,12 +105,10 @@ _ecore_evas_show(Ecore_Evas *ee)
105 Ecore_Evas_Engine_Buffer_Data *bdata = ee->engine.data; 105 Ecore_Evas_Engine_Buffer_Data *bdata = ee->engine.data;
106 106
107 if (bdata->image) return; 107 if (bdata->image) return;
108 if (ee->prop.focused) return; 108 if (ecore_evas_focus_device_get(ee, NULL)) return;
109 ee->prop.focused = EINA_TRUE;
110 ee->prop.withdrawn = EINA_FALSE; 109 ee->prop.withdrawn = EINA_FALSE;
111 if (ee->func.fn_state_change) ee->func.fn_state_change(ee); 110 if (ee->func.fn_state_change) ee->func.fn_state_change(ee);
112 evas_focus_in(ee->evas); 111 _ecore_evas_focus_device_set(ee, NULL, EINA_TRUE);
113 if (ee->func.fn_focus_in) ee->func.fn_focus_in(ee);
114} 112}
115 113
116static int 114static int
@@ -413,9 +411,7 @@ _ecore_evas_buffer_cb_focus_in(void *data, Evas *e EINA_UNUSED, Evas_Object *obj
413 Ecore_Evas *ee; 411 Ecore_Evas *ee;
414 412
415 ee = data; 413 ee = data;
416 ee->prop.focused = EINA_TRUE; 414 _ecore_evas_focus_device_set(ee, NULL, EINA_TRUE);
417 evas_focus_in(ee->evas);
418 if (ee->func.fn_focus_in) ee->func.fn_focus_in(ee);
419} 415}
420 416
421static void 417static void
@@ -424,9 +420,7 @@ _ecore_evas_buffer_cb_focus_out(void *data, Evas *e EINA_UNUSED, Evas_Object *ob
424 Ecore_Evas *ee; 420 Ecore_Evas *ee;
425 421
426 ee = data; 422 ee = data;
427 ee->prop.focused = EINA_FALSE; 423 _ecore_evas_focus_device_set(ee, NULL, EINA_FALSE);
428 evas_focus_out(ee->evas);
429 if (ee->func.fn_focus_out) ee->func.fn_focus_out(ee);
430} 424}
431 425
432static void 426static void
@@ -608,6 +602,9 @@ static Ecore_Evas_Engine_Func _ecore_buffer_engine_func =
608 NULL, // fn_animator_unregister 602 NULL, // fn_animator_unregister
609 603
610 NULL, // fn_evas_changed 604 NULL, // fn_evas_changed
605 NULL, //fn_focus_device_set
606 NULL, //fn_callback_focus_device_in_set
607 NULL, //fn_callback_focus_device_out_set
611}; 608};
612 609
613static void * 610static void *
@@ -672,7 +669,6 @@ ecore_evas_buffer_allocfunc_new(int w, int h,
672 ee->prop.max.w = 0; 669 ee->prop.max.w = 0;
673 ee->prop.max.h = 0; 670 ee->prop.max.h = 0;
674 ee->prop.layer = 0; 671 ee->prop.layer = 0;
675 ee->prop.focused = EINA_TRUE;
676 ee->prop.borderless = EINA_TRUE; 672 ee->prop.borderless = EINA_TRUE;
677 ee->prop.override = EINA_TRUE; 673 ee->prop.override = EINA_TRUE;
678 ee->prop.maximized = EINA_TRUE; 674 ee->prop.maximized = EINA_TRUE;
@@ -727,7 +723,8 @@ ecore_evas_buffer_allocfunc_new(int w, int h,
727 _ecore_evas_register(ee); 723 _ecore_evas_register(ee);
728 724
729 evas_event_feed_mouse_in(ee->evas, (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff), NULL); 725 evas_event_feed_mouse_in(ee->evas, (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff), NULL);
730 726 _ecore_evas_focus_device_set(ee, NULL, EINA_TRUE);
727
731 return ee; 728 return ee;
732} 729}
733 730
@@ -811,7 +808,6 @@ ecore_evas_object_image_new(Ecore_Evas *ee_target)
811 ee->prop.max.w = 0; 808 ee->prop.max.w = 0;
812 ee->prop.max.h = 0; 809 ee->prop.max.h = 0;
813 ee->prop.layer = 0; 810 ee->prop.layer = 0;
814 ee->prop.focused = EINA_FALSE;
815 ee->prop.borderless = EINA_TRUE; 811 ee->prop.borderless = EINA_TRUE;
816 ee->prop.override = EINA_TRUE; 812 ee->prop.override = EINA_TRUE;
817 ee->prop.maximized = EINA_FALSE; 813 ee->prop.maximized = EINA_FALSE;