summaryrefslogtreecommitdiff
path: root/desktop/browser.c
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2012-08-19 12:46:42 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2012-08-19 12:46:42 +0100
commit57d2e31e591b97106f9c66ce54c96bc094208a54 (patch)
tree643ce8c6a28e210efe4b4baa4eab03bf1617d050 /desktop/browser.c
parent762cade3622a4295c7209307a4626773bd6bc7c0 (diff)
downloadnetsurf-57d2e31e591b97106f9c66ce54c96bc094208a54.tar.gz
netsurf-57d2e31e591b97106f9c66ce54c96bc094208a54.tar.bz2
Avoid using hlcache_handle for drag saves in html_interaction. Drag save msg with NULL content now means save the content which sends the message.
Diffstat (limited to 'desktop/browser.c')
-rw-r--r--desktop/browser.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/desktop/browser.c b/desktop/browser.c
index e7d39fd8b..3fe16f54c 100644
--- a/desktop/browser.c
+++ b/desktop/browser.c
@@ -1456,26 +1456,27 @@ nserror browser_window_callback(hlcache_handle *c,
{
/* Content wants drag save of a content */
struct browser_window *root = browser_window_get_root(bw);
+ hlcache_handle *save = event->data.dragsave.content;
+
+ if (save == NULL) {
+ save = c;
+ }
switch(event->data.dragsave.type) {
case CONTENT_SAVE_ORIG:
- gui_drag_save_object(GUI_SAVE_OBJECT_ORIG,
- event->data.dragsave.content,
+ gui_drag_save_object(GUI_SAVE_OBJECT_ORIG, save,
root->window);
break;
case CONTENT_SAVE_NATIVE:
- gui_drag_save_object(GUI_SAVE_OBJECT_NATIVE,
- event->data.dragsave.content,
+ gui_drag_save_object(GUI_SAVE_OBJECT_NATIVE, save,
root->window);
break;
case CONTENT_SAVE_COMPLETE:
- gui_drag_save_object(GUI_SAVE_COMPLETE,
- event->data.dragsave.content,
+ gui_drag_save_object(GUI_SAVE_COMPLETE, save,
root->window);
break;
case CONTENT_SAVE_SOURCE:
- gui_drag_save_object(GUI_SAVE_SOURCE,
- event->data.dragsave.content,
+ gui_drag_save_object(GUI_SAVE_SOURCE, save,
root->window);
break;
}