From 9644d0594c1dfcc6e104754793a75d23c7a6840e Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Fri, 10 May 2013 11:54:26 +0100 Subject: Remove struct selection from gui_drag_save_selection, so gui.h doesn't need it now. --- desktop/gui.h | 3 +-- desktop/selection.c | 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'desktop') diff --git a/desktop/gui.h b/desktop/gui.h index b38bb61d5..f4b8b7215 100644 --- a/desktop/gui.h +++ b/desktop/gui.h @@ -50,7 +50,6 @@ typedef enum { struct gui_window; struct gui_download_window; struct browser_window; -struct selection; struct form_control; #include @@ -116,7 +115,7 @@ void gui_download_window_done(struct gui_download_window *dw); void gui_drag_save_object(gui_save_type type, hlcache_handle *c, struct gui_window *g); -void gui_drag_save_selection(struct selection *s, struct gui_window *g); +void gui_drag_save_selection(struct gui_window *g, const char *selection); void gui_start_selection(struct gui_window *g); void gui_clear_selection(struct gui_window *g); diff --git a/desktop/selection.c b/desktop/selection.c index 1b85a090c..13a1293e3 100644 --- a/desktop/selection.c +++ b/desktop/selection.c @@ -273,8 +273,9 @@ bool selection_click(struct selection *s, browser_mouse_state mouse, ((mouse & BROWSER_MOUSE_DRAG_1) || (modkeys && (mouse & BROWSER_MOUSE_DRAG_2)))) { /* drag-saving selection */ - - gui_drag_save_selection(s, top->window); + char *sel = selection_get_copy(s); + gui_drag_save_selection(top->window, sel); + free(sel); } else if (!modkeys) { if (pos && (mouse & BROWSER_MOUSE_PRESS_1)) { -- cgit v1.2.3