diff options
author | Adrian Lees <adrian@aemulor.com> | 2005-04-20 12:24:41 +0000 |
---|---|---|
committer | Adrian Lees <adrian@aemulor.com> | 2005-04-20 12:24:41 +0000 |
commit | 31c659a2ea8bf239569c8436e3b718786879df47 (patch) | |
tree | 4f934f55f0ba0151372135156e4bdb3ff461c6b4 /desktop/browser.c | |
parent | a01210941b7717317cd4bd3c451596a845093d9c (diff) | |
download | netsurf-31c659a2ea8bf239569c8436e3b718786879df47.tar.gz netsurf-31c659a2ea8bf239569c8436e3b718786879df47.tar.bz2 |
[project @ 2005-04-20 12:24:41 by adrianl]
text import from global clipboard, other apps & files and additional keys for editing text in textareas
svn path=/import/netsurf/; revision=1673
Diffstat (limited to 'desktop/browser.c')
-rw-r--r-- | desktop/browser.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/desktop/browser.c b/desktop/browser.c index 0a7775838..49d81dadd 100644 --- a/desktop/browser.c +++ b/desktop/browser.c @@ -97,6 +97,7 @@ void browser_window_create(const char *url, struct browser_window *clone, bw->sel = selection_create(bw); bw->throbbing = false; bw->caret_callback = NULL; + bw->paste_callback = NULL; bw->frag_id = NULL; bw->drag_type = DRAGGING_NONE; bw->scrolling_box = NULL; @@ -292,6 +293,7 @@ void browser_window_callback(content_msg msg, struct content *c, bw->current_content = c; bw->loading_content = NULL; bw->caret_callback = NULL; + bw->paste_callback = NULL; bw->scrolling_box = NULL; gui_window_new_content(bw->window); if (bw->frag_id) @@ -335,6 +337,7 @@ void browser_window_callback(content_msg msg, struct content *c, else if (c == bw->current_content) { bw->current_content = 0; bw->caret_callback = NULL; + bw->paste_callback = NULL; bw->scrolling_box = NULL; selection_init(bw->sel, NULL); } @@ -384,6 +387,7 @@ void browser_window_callback(content_msg msg, struct content *c, else if (c == bw->current_content) { bw->current_content = 0; bw->caret_callback = NULL; + bw->paste_callback = NULL; bw->scrolling_box = NULL; selection_init(bw->sel, NULL); } @@ -936,6 +940,11 @@ void browser_window_mouse_action_html(struct browser_window *bw, if (text_box && selection_click(bw->sel, text_box, mouse, x - box_x, y - box_y)) { + /* key presses must be directed at the main browser window, + paste text operations ignored */ + if (bw->caret_callback) bw->caret_callback = NULL; + if (bw->paste_callback) bw->paste_callback = NULL; + if (selection_dragging(bw->sel)) { bw->drag_type = DRAGGING_SELECTION; status = messages_get("Selecting"); |