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/gui.c | 56 ++++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 36 insertions(+), 20 deletions(-) (limited to 'amiga/gui.c') diff --git a/amiga/gui.c b/amiga/gui.c index c6b382253..a5d696c36 100755 --- a/amiga/gui.c +++ b/amiga/gui.c @@ -939,6 +939,40 @@ void ami_handle_msg(void) continue; } } + else if(node->Type == AMINS_DLWINDOW) + { + if(ami_download_window_event((struct gui_download_window *)gwin)) + { + if(IsMinListEmpty(window_list)) + { + /* last window closed, so exit */ + ami_try_quit(); + } + break; + } + else + { + node = nnode; + continue; + } + } + else if(node->Type == AMINS_LOGINWINDOW) + { + if(ami_401login_event((struct gui_login_window *)gwin)) + { + if(IsMinListEmpty(window_list)) + { + /* last window closed, so exit */ + ami_try_quit(); + } + break; + } + else + { + node = nnode; + continue; + } + } while((result = RA_HandleInput(gwin->objects[OID_MAIN],&code)) != WMHI_LASTMSG) { @@ -1173,24 +1207,6 @@ void ami_handle_msg(void) ami_update_buttons(gwin); break; - case GID_LOGIN: - ami_401login_login((struct gui_login_window *)gwin); - win_destroyed = true; - break; - - case GID_CANCEL: - if(gwin->node->Type == AMINS_LOGINWINDOW) - { - ami_401login_close((struct gui_login_window *)gwin); - win_destroyed = true; - } - else if(gwin->node->Type == AMINS_DLWINDOW) - { - ami_download_window_abort((struct gui_download_window *)gwin); - win_destroyed = true; - } - break; - default: // printf("GADGET: %ld\n",(result & WMHI_GADGETMASK)); break; @@ -2975,7 +2991,7 @@ void ami_do_redraw_limits(struct gui_window *g, hlcache_handle *c,int x0, int y0 GetAttr(SPACE_AreaBox, g->shared->objects[GID_BROWSER], (ULONG *)&bbox); if(!c) return; -// if (c->locked) return; + if(content_is_locked(c)) return; current_redraw_browser = g->shared->bw; @@ -3091,7 +3107,7 @@ void ami_do_redraw(struct gui_window_2 *g) c = g->bw->current_content; if(!c) return; -// if (c->locked) return; + if(content_is_locked(c)) return; current_redraw_browser = g->bw; // currp = &browserglob.rp; -- cgit v1.2.3