From b6937419e17c80613f5b1436ce9833e24d6221fa Mon Sep 17 00:00:00 2001 From: Chris Young Date: Fri, 9 Apr 2010 22:38:51 +0000 Subject: Fix broken event handling. Any structures attached to the window_list *must* have a struct nsObject * as their first entry, and handle events outside of gui.c. svn path=/trunk/netsurf/; revision=10332 --- amiga/login.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'amiga/login.c') diff --git a/amiga/login.c b/amiga/login.c index 85537937f..66c3d326d 100755 --- a/amiga/login.c +++ b/amiga/login.c @@ -147,3 +147,32 @@ void ami_401login_login(struct gui_login_window *lw) ami_401login_close(lw); } + +BOOL ami_401login_event(struct gui_login_window *lw) +{ + /* return TRUE if window destroyed */ + ULONG class,result,relevent = 0; + uint16 code; + + while((result = RA_HandleInput(lw->objects[OID_MAIN], &code)) != WMHI_LASTMSG) + { + switch(result & WMHI_CLASSMASK) // class + { + case WMHI_GADGETUP: + switch(result & WMHI_GADGETMASK) + { + case GID_LOGIN: + ami_401login_login(lw); + return TRUE; + break; + + case GID_CANCEL: + ami_401login_close(lw); + return TRUE; + break; + } + break; + } + } + return FALSE; +} -- cgit v1.2.3