add focusgrab test

this test demonstrates one of the more annoying aspects of x11 focus
This commit is contained in:
Mike Blumenkrantz 2015-06-29 18:14:20 -04:00
parent 82a320404c
commit 9e0764809f
1 changed files with 22 additions and 0 deletions

22
src/tests/focusgrab.c Normal file
View File

@ -0,0 +1,22 @@
#include <Ecore.h>
#include <Ecore_Evas.h>
static Eina_Bool
_focus(Ecore_Evas *ee)
{
ecore_evas_focus_set(ee, 1);
return 1;
}
int
main(void)
{
Ecore_Evas *ee;
ecore_evas_init();
ee = ecore_evas_new(NULL, 0, 0, 200, 200, NULL);
ecore_evas_show(ee);
ecore_timer_add(3.0, (Ecore_Task_Cb)_focus, ee);
ecore_main_loop_begin();
return 0;
}