diff --git a/src/draw/background.c b/src/draw/background.c index c378f12d..1f119d68 100644 --- a/src/draw/background.c +++ b/src/draw/background.c @@ -51,7 +51,7 @@ void Background_Init( LCUI_Background *bg ) bg->position.value = SV_AUTO; } -typedef void(*MixerPtr)(LCUI_Graph*, const LCUI_Graph*, int, int); +typedef int(*MixerPtr)(LCUI_Graph*, const LCUI_Graph*, int, int); void Graph_DrawBackground( LCUI_PaintContext paint, const LCUI_Rect *box, LCUI_Background *bg ) diff --git a/src/gui/widget_event.c b/src/gui/widget_event.c index f3adea66..1cd99ba7 100644 --- a/src/gui/widget_event.c +++ b/src/gui/widget_event.c @@ -442,8 +442,9 @@ int Widget_PostSurfaceEvent( LCUI_Widget w, int event_type ) return Widget_PostEvent( root, &e, *((int**)n), NULL ); } -static unsigned int Dict_KeyHash( const wchar_t *buf ) +static unsigned int Dict_KeyHash( const void *key ) { + const char *buf = key; unsigned int hash = 5381; while( *buf ) { hash = ((hash << 5) + hash) + (*buf++); diff --git a/src/input/keyboard.c b/src/input/keyboard.c index 3b467940..a36a4ba9 100755 --- a/src/input/keyboard.c +++ b/src/input/keyboard.c @@ -274,16 +274,15 @@ int LCUIKeyboard_GetKey( void ) #ifdef LCUI_KEYBOARD_DRIVER_LINUX static LCUI_BOOL LCUIKeyboard_Proc(void) { - LCUI_SysEvent e; + LCUI_SysEventRec e; /* 如果没有按键输入 */ if ( !LCUIKeyboard_IsHit() ) { return FALSE; } e.type = LCUI_KEYDOWN; - e.type_name = NULL; e.key_code = LCUIKeyboard_GetKey(); - LCUI_PostEvent( &e ); + LCUI_TriggerEvent( &e ); return TRUE; } #endif