diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2008-10-20 18:06:46 +0000 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2008-10-20 18:06:46 +0000 |
commit | 1fffdafe21967c361ef91b952a1fee6b87e50b5c (patch) | |
tree | 3b68535e0e2bfc9a3d14cf9e67031a7214a452f0 /amiga/gui.c | |
parent | 307b88e934a9607350d35ba7c8ea923b41e257b8 (diff) | |
download | netsurf-1fffdafe21967c361ef91b952a1fee6b87e50b5c.tar.gz netsurf-1fffdafe21967c361ef91b952a1fee6b87e50b5c.tar.bz2 |
Prepare for context menus
svn path=/trunk/netsurf/; revision=5607
Diffstat (limited to 'amiga/gui.c')
-rwxr-xr-x | amiga/gui.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/amiga/gui.c b/amiga/gui.c index bd46b8b53..dfd7496b4 100755 --- a/amiga/gui.c +++ b/amiga/gui.c @@ -107,6 +107,7 @@ struct PopupMenuIFace *IPopupMenu = NULL; struct BitMap *throbber = NULL; ULONG throbber_width,throbber_height,throbber_frames; +BOOL rmbtrapped; static struct RastPort dummyrp; struct IFFHandle *iffh = NULL; @@ -509,6 +510,12 @@ void ami_handle_msg(void) if((x>=xs) && (y>=ys) && (x<width+xs) && (y<height+ys)) { + if(option_context_menu && rmbtrapped == FALSE) + { + SetAttrs(gwin->objects[OID_MAIN],WA_RMBTrap,TRUE); + rmbtrapped=TRUE; + } + if(gwin->mouse_state & BROWSER_MOUSE_PRESS_1) { browser_window_mouse_track(gwin->bw,BROWSER_MOUSE_DRAG_1 | gwin->key_state,x,y); @@ -526,6 +533,12 @@ void ami_handle_msg(void) } else { + if(option_context_menu && rmbtrapped == TRUE) + { + SetAttrs(gwin->objects[OID_MAIN],WA_RMBTrap,FALSE); + rmbtrapped=FALSE; + } + if(!gwin->mouse_state) ami_update_pointer(gwin->win,GUI_POINTER_DEFAULT); } break; @@ -1926,6 +1939,7 @@ void gui_window_update_extent(struct gui_window *g) ULONG cur_tab = 0; if(!g) return; + if(!g->shared->bw->current_content) return; if(g->tab_node) GetAttr(CLICKTAB_Current,g->shared->gadgets[GID_TABS],(ULONG *)&cur_tab); |