Change the mouse pointer back to what it was (and what NetSurf thinks it is) instead of to the default pointer. Additionally don't use ami_update_pointer for treeview windows as AmigaOS has a pointer setting per window, but NetSurf is only storing the current one as a single global variable.
This commit is contained in:
parent
dfc2fe6f97
commit
07024b05c4
|
@ -275,7 +275,12 @@ STATIC VOID rx_save(struct ARexxCmd *cmd, struct RexxMsg *rxm __attribute__((unu
|
|||
|
||||
if(!bw) return;
|
||||
|
||||
ami_update_pointer(bw->window->shared->win,GUI_POINTER_WAIT);
|
||||
/* Set the busy pointer. We intentionally don't use ami_update_pointer here. */
|
||||
SetWindowPointer(bw->window->shared->win,
|
||||
WA_BusyPointer, TRUE,
|
||||
WA_PointerDelay, TRUE,
|
||||
TAG_DONE);
|
||||
|
||||
if(fh = FOpen((char *)cmd->ac_ArgList[0], MODE_NEWFILE, 0))
|
||||
{
|
||||
if(source_data = content_get_source_data(bw->current_content, &source_size))
|
||||
|
@ -285,7 +290,7 @@ STATIC VOID rx_save(struct ARexxCmd *cmd, struct RexxMsg *rxm __attribute__((unu
|
|||
SetComment((char *)cmd->ac_ArgList[0], nsurl_access(hlcache_handle_get_url(bw->current_content)));
|
||||
}
|
||||
|
||||
ami_update_pointer(bw->window->shared->win,GUI_POINTER_DEFAULT);
|
||||
ami_reset_pointer(bw->window->shared->win);
|
||||
}
|
||||
|
||||
STATIC VOID rx_quit(struct ARexxCmd *cmd, struct RexxMsg *rxm __attribute__((unused)))
|
||||
|
|
|
@ -356,7 +356,12 @@ gui_window_save_link(struct gui_window *g, const char *url, const char *title)
|
|||
{
|
||||
strlcpy(fname, savereq->fr_Drawer, 1024);
|
||||
AddPart(fname,savereq->fr_File,1024);
|
||||
ami_update_pointer(g->shared->win,GUI_POINTER_WAIT);
|
||||
|
||||
/* Set the busy pointer. We intentionally don't use ami_update_pointer here. */
|
||||
SetWindowPointer(g->shared->win,
|
||||
WA_BusyPointer, TRUE,
|
||||
WA_PointerDelay, TRUE,
|
||||
TAG_DONE);
|
||||
|
||||
if(ami_download_check_overwrite(fname, g->shared->win, 0))
|
||||
{
|
||||
|
@ -383,7 +388,7 @@ gui_window_save_link(struct gui_window *g, const char *url, const char *title)
|
|||
}
|
||||
FreeVec(linkname);
|
||||
}
|
||||
ami_update_pointer(g->shared->win,GUI_POINTER_DEFAULT);
|
||||
ami_reset_pointer(g->shared->win);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
10
amiga/drag.c
10
amiga/drag.c
|
@ -142,7 +142,7 @@ void ami_drag_save(struct Window *win)
|
|||
return;
|
||||
}
|
||||
|
||||
ami_update_pointer(win,GUI_POINTER_WAIT);
|
||||
ami_update_pointer(win, GUI_POINTER_WAIT, false);
|
||||
|
||||
switch(drag_save)
|
||||
{
|
||||
|
@ -189,7 +189,7 @@ void ami_drag_save(struct Window *win)
|
|||
|
||||
drag_save = 0;
|
||||
drag_save_data = NULL;
|
||||
ami_update_pointer(win,GUI_POINTER_DEFAULT);
|
||||
ami_update_pointer(win, GUI_POINTER_DEFAULT, false);
|
||||
}
|
||||
|
||||
void ami_drag_icon_show(struct Window *win, const char *type)
|
||||
|
@ -205,12 +205,12 @@ void ami_drag_icon_show(struct Window *win, const char *type)
|
|||
|
||||
if(nsoption_bool(drag_save_icons) == false)
|
||||
{
|
||||
ami_update_pointer(win, AMI_GUI_POINTER_DRAG);
|
||||
ami_update_pointer(win, AMI_GUI_POINTER_DRAG, false);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
ami_update_pointer(win, GUI_POINTER_DEFAULT);
|
||||
ami_update_pointer(win, GUI_POINTER_DEFAULT, false);
|
||||
}
|
||||
|
||||
if(!strcmp(type, "drawer")) deftype = WBDRAWER;
|
||||
|
@ -266,7 +266,7 @@ void ami_drag_icon_move(void)
|
|||
void ami_drag_icon_close(struct Window *win)
|
||||
{
|
||||
if(drag_icon) CloseWindow(drag_icon);
|
||||
if(win) ami_update_pointer(win, GUI_POINTER_DEFAULT);
|
||||
if(win) ami_update_pointer(win, GUI_POINTER_DEFAULT, false);
|
||||
drag_icon = NULL;
|
||||
drag_in_progress = FALSE;
|
||||
}
|
||||
|
|
|
@ -141,7 +141,7 @@ void ami_file_save(int type, char *fname, struct Window *win,
|
|||
struct bitmap *bm;
|
||||
BPTR fh=0;
|
||||
|
||||
ami_update_pointer(win, GUI_POINTER_WAIT);
|
||||
ami_update_pointer(win, GUI_POINTER_WAIT, false);
|
||||
|
||||
if(ami_download_check_overwrite(fname, win, 0))
|
||||
{
|
||||
|
@ -200,7 +200,7 @@ void ami_file_save(int type, char *fname, struct Window *win,
|
|||
if(object) SetComment(fname, nsurl_access(hlcache_handle_get_url(object)));
|
||||
}
|
||||
|
||||
ami_update_pointer(win, GUI_POINTER_DEFAULT);
|
||||
ami_update_pointer(win, GUI_POINTER_DEFAULT, false);
|
||||
}
|
||||
|
||||
void ami_file_save_req(int type, struct gui_window_2 *gwin,
|
||||
|
|
|
@ -1435,7 +1435,7 @@ void ami_handle_msg(void)
|
|||
{
|
||||
ami_context_menu_mouse_trap(gwin, FALSE);
|
||||
|
||||
if(!gwin->mouse_state) ami_update_pointer(gwin->win,GUI_POINTER_DEFAULT);
|
||||
if(!gwin->mouse_state) ami_update_pointer(gwin->win, GUI_POINTER_DEFAULT, false);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -3600,6 +3600,7 @@ void ami_do_redraw_tiled(struct gui_window_2 *gwin,
|
|||
int tile_x_scale = (int)(nsoption_int(redraw_tile_size_x) / gwin->bw->scale);
|
||||
int tile_y_scale = (int)(nsoption_int(redraw_tile_size_y) / gwin->bw->scale);
|
||||
|
||||
/* Set the busy pointer. We intentionally don't use ami_update_pointer here. */
|
||||
SetWindowPointer(gwin->win,
|
||||
WA_BusyPointer, TRUE,
|
||||
WA_PointerDelay, TRUE,
|
||||
|
@ -3673,7 +3674,7 @@ void ami_do_redraw_tiled(struct gui_window_2 *gwin,
|
|||
}
|
||||
}
|
||||
|
||||
SetWindowPointer(gwin->win, TAG_DONE);
|
||||
ami_reset_pointer(gwin->win);
|
||||
}
|
||||
|
||||
|
||||
|
@ -3851,6 +3852,7 @@ void ami_do_redraw(struct gui_window_2 *gwin)
|
|||
clip.x1 = bbox->Left + bbox->Width;
|
||||
clip.y1 = bbox->Top + bbox->Height;
|
||||
|
||||
/* Set the busy pointer. We intentionally don't use ami_update_pointer here. */
|
||||
SetWindowPointer(gwin->win,
|
||||
WA_BusyPointer, TRUE,
|
||||
WA_PointerDelay, TRUE,
|
||||
|
@ -3862,7 +3864,7 @@ void ami_do_redraw(struct gui_window_2 *gwin)
|
|||
browserglob.rp = temprp;
|
||||
}
|
||||
|
||||
SetWindowPointer(gwin->win, TAG_DONE);
|
||||
ami_reset_pointer(gwin->win);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -753,9 +753,9 @@ static void ami_menu_item_project_print(struct Hook *hook, APTR window, struct I
|
|||
struct gui_window_2 *gwin;
|
||||
GetAttr(WINDOW_UserData, (Object *)window, (ULONG *)&gwin);
|
||||
|
||||
ami_update_pointer(gwin->win,GUI_POINTER_WAIT);
|
||||
ami_update_pointer(gwin->win, GUI_POINTER_WAIT, false);
|
||||
ami_print_ui(gwin->bw->current_content);
|
||||
ami_update_pointer(gwin->win,GUI_POINTER_DEFAULT);
|
||||
ami_update_pointer(gwin->win, GUI_POINTER_DEFAULT, false);
|
||||
}
|
||||
|
||||
static void ami_menu_item_project_about(struct Hook *hook, APTR window, struct IntuiMessage *msg)
|
||||
|
@ -766,7 +766,7 @@ static void ami_menu_item_project_about(struct Hook *hook, APTR window, struct I
|
|||
|
||||
GetAttr(WINDOW_UserData, (Object *)window, (ULONG *)&gwin);
|
||||
|
||||
ami_update_pointer(gwin->win,GUI_POINTER_WAIT);
|
||||
ami_update_pointer(gwin->win, GUI_POINTER_WAIT, false);
|
||||
|
||||
temp = ASPrintf("%s|%s|%s", messages_get("OK"),
|
||||
messages_get("HelpCredits"),
|
||||
|
@ -800,7 +800,7 @@ static void ami_menu_item_project_about(struct Hook *hook, APTR window, struct I
|
|||
else if(sel == 0)
|
||||
browser_window_create("about:licence", NULL, 0, true, false);
|
||||
|
||||
ami_update_pointer(gwin->win,GUI_POINTER_DEFAULT);
|
||||
ami_update_pointer(gwin->win, GUI_POINTER_DEFAULT, false);
|
||||
}
|
||||
|
||||
static void ami_menu_item_project_quit(struct Hook *hook, APTR window, struct IntuiMessage *msg)
|
||||
|
|
|
@ -174,12 +174,18 @@ void ami_get_theme_filename(char *filename, char *themestring, bool protocol)
|
|||
|
||||
void gui_window_set_pointer(struct gui_window *g, gui_pointer_shape shape)
|
||||
{
|
||||
ami_update_pointer(g->shared->win,shape);
|
||||
ami_update_pointer(g->shared->win, shape, false);
|
||||
}
|
||||
|
||||
void ami_update_pointer(struct Window *win, gui_pointer_shape shape)
|
||||
/* reset the mouse pointer back to what NetSurf last set it as */
|
||||
void ami_reset_pointer(struct Window *win)
|
||||
{
|
||||
if(mouseptrcurrent == shape) return;
|
||||
ami_update_pointer(win, mouseptrcurrent, true);
|
||||
}
|
||||
|
||||
void ami_update_pointer(struct Window *win, gui_pointer_shape shape, bool reapply)
|
||||
{
|
||||
if((mouseptrcurrent == shape) && (reapply == false)) return;
|
||||
if(drag_save_data) return;
|
||||
|
||||
if(nsoption_bool(use_os_pointers))
|
||||
|
|
|
@ -35,5 +35,6 @@ void ami_update_throbber(struct gui_window_2 *g,bool redraw);
|
|||
|
||||
void ami_init_mouse_pointers(void);
|
||||
void ami_mouse_pointers_free(void);
|
||||
void ami_update_pointer(struct Window *win, gui_pointer_shape shape);
|
||||
void ami_update_pointer(struct Window *win, gui_pointer_shape shape, bool reapply);
|
||||
void ami_reset_pointer(struct Window *win);
|
||||
#endif
|
||||
|
|
16
amiga/tree.c
16
amiga/tree.c
|
@ -991,12 +991,15 @@ BOOL ami_tree_event(struct treeview_window *twin)
|
|||
{
|
||||
strlcpy(fname,savereq->fr_Drawer,1024);
|
||||
AddPart(fname,savereq->fr_File,1024);
|
||||
ami_update_pointer(twin->win,GUI_POINTER_WAIT);
|
||||
SetWindowPointer(twin->win,
|
||||
WA_BusyPointer, TRUE,
|
||||
WA_PointerDelay, TRUE,
|
||||
TAG_DONE);
|
||||
if(twin->type == AMI_TREE_HISTORY)
|
||||
history_global_export(fname);
|
||||
else if(twin->type == AMI_TREE_HOTLIST)
|
||||
hotlist_export(fname);
|
||||
ami_update_pointer(twin->win,GUI_POINTER_DEFAULT);
|
||||
SetWindowPointer(twin->win, TAG_DONE);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1237,9 +1240,12 @@ void ami_tree_redraw_request(int x, int y, int width, int height, void *data)
|
|||
};
|
||||
|
||||
if(!twin->win) return;
|
||||
// if(tree_get_redraw(twin->tree) == false) return;
|
||||
|
||||
ami_update_pointer(twin->win, GUI_POINTER_WAIT);
|
||||
SetWindowPointer(twin->win,
|
||||
WA_BusyPointer, TRUE,
|
||||
WA_PointerDelay, TRUE,
|
||||
TAG_DONE);
|
||||
|
||||
glob = &twin->globals;
|
||||
|
||||
GetAttr(SPACE_AreaBox,twin->objects[GID_BROWSER],(ULONG *)&bbox);
|
||||
|
@ -1286,6 +1292,6 @@ void ami_tree_redraw_request(int x, int y, int width, int height, void *data)
|
|||
}
|
||||
}
|
||||
|
||||
ami_update_pointer(twin->win, GUI_POINTER_DEFAULT);
|
||||
SetWindowPointer(twin->win, TAG_DONE);
|
||||
glob = &browserglob;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue