summaryrefslogtreecommitdiff
path: root/amiga/login.c
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2010-04-09 22:38:51 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2010-04-09 22:38:51 +0000
commitb6937419e17c80613f5b1436ce9833e24d6221fa (patch)
treeb483965da833eda1620002d3fbcf3704683fa0e0 /amiga/login.c
parent4a4cc0d1bce9967fcd1fed4cea12c008702a38fc (diff)
downloadnetsurf-b6937419e17c80613f5b1436ce9833e24d6221fa.tar.gz
netsurf-b6937419e17c80613f5b1436ce9833e24d6221fa.tar.bz2
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
Diffstat (limited to 'amiga/login.c')
-rwxr-xr-xamiga/login.c29
1 files changed, 29 insertions, 0 deletions
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;
+}