fix 2 more things in ecore-fb

SVN revision: 73361
This commit is contained in:
Carsten Haitzler 2012-07-05 14:51:29 +00:00
parent 8e8a6b7425
commit 28200419f1
3 changed files with 23 additions and 1 deletions

View File

@ -811,4 +811,5 @@
pos/size as it should.
* Fix ecore-fb to use key repeat like x so apps dont break in fb
* Fix ecore-fb string lookup table to include ctrl+keys
* Fix ecore-fb to trap sigint (ctrl+c) so it doesnt exit your fb app
* Fix ecore-fb mouse to swap button 2 and 3 ro work right.

View File

@ -17,6 +17,13 @@ static int _ecore_fb_console_h = 0;
* @{
*/
static sighandler_t oldhand = NULL;
static void
nosigint(int val __UNUSED__)
{
}
/**
* @brief Initialize the Ecore_Fb library.
*
@ -39,6 +46,11 @@ ecore_fb_init(const char *name __UNUSED__)
if (!ecore_fb_vt_init())
return --_ecore_fb_init_count;
if (!oldhand)
{
oldhand = signal(SIGINT, nosigint);
}
_ecore_fb_size_get(&_ecore_fb_console_w, &_ecore_fb_console_h);
return _ecore_fb_init_count;
@ -59,6 +71,12 @@ ecore_fb_shutdown(void)
if (--_ecore_fb_init_count != 0)
return _ecore_fb_init_count;
if (oldhand)
{
signal(SIGINT, oldhand);
oldhand = NULL;
}
ecore_fb_vt_shutdown();
return _ecore_fb_init_count;

View File

@ -148,6 +148,9 @@ _ecore_fb_li_device_event_key(Ecore_Fb_Input_Device *dev, struct input_event *ie
double current = ecore_loop_time_get();
button = ((iev->code & 0x00F) + 1);
// swap 2 and 3 to make middle and right butotn work right.
if (button == 3) button = 2;
else if (button == 2) button = 3;
if (iev->value)
{
dev->mouse.did_double = EINA_FALSE;