diff options
author | Adrian Lees <adrian@aemulor.com> | 2005-04-16 21:26:15 +0000 |
---|---|---|
committer | Adrian Lees <adrian@aemulor.com> | 2005-04-16 21:26:15 +0000 |
commit | 28cbe9193a9050d7479b12e1500dbf3a18372840 (patch) | |
tree | 018de22945f230b2dc3c30f9cfd04769f2d825bf /riscos/save.c | |
parent | 352e18ac37c188d228e2c1e5a19d626d3b39957d (diff) | |
download | netsurf-28cbe9193a9050d7479b12e1500dbf3a18372840.tar.gz netsurf-28cbe9193a9050d7479b12e1500dbf3a18372840.tar.bz2 |
[project @ 2005-04-16 21:26:15 by adrianl]
Ignores save drags that stay within SaveAs/download window
svn path=/import/netsurf/; revision=1655
Diffstat (limited to 'riscos/save.c')
-rw-r--r-- | riscos/save.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/riscos/save.c b/riscos/save.c index 1714a7e14..aeb677bca 100644 --- a/riscos/save.c +++ b/riscos/save.c @@ -313,8 +313,15 @@ void ro_gui_save_drag_end(wimp_dragged *drag) const char *name; wimp_pointer pointer; wimp_message message; + os_error *error; - wimp_get_pointer_info(&pointer); + error = xwimp_get_pointer_info(&pointer); + if (error) { + LOG(("xwimp_get_pointer_info: 0x%x: %s", + error->errnum, error->errmess)); + warn_user("WimpError", error->errmess); + return; + } if (gui_save_dialogw == (wimp_w)-1) { /* saving directly from browser window, choose a name based upon the URL */ @@ -328,8 +335,12 @@ void ro_gui_save_drag_end(wimp_dragged *drag) } } else { - /* saving from dialog, grab leafname from icon */ char *dot; + + /* ignore drags to the saveas window itself */ + if (pointer.w == gui_save_dialogw) return; + + /* saving from dialog, grab leafname from icon */ name = ro_gui_get_icon_string(gui_save_dialogw, ICON_SAVE_PATH); dot = strrchr(name, '.'); if (dot) |