summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorportix <portix@gmx.net>2012-01-26 21:03:53 +0100
committerportix <portix@gmx.net>2012-01-26 21:03:53 +0100
commitdfec71da388998cfa4d1f653b9f6dbb6a33e4868 (patch)
tree00568818983a0a565448461fb4a0cc24e8f361d0 /src
parente483dc6dd76cd620d149ff9bad4de6de19542bb6 (diff)
downloaddwb-dfec71da388998cfa4d1f653b9f6dbb6a33e4868.zip
Focus insert mode when editor is closed fixes #80
Diffstat (limited to 'src')
-rw-r--r--src/config.h2
-rw-r--r--src/dwb.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/config.h b/src/config.h
index b807cccb..34a63c24 100644
--- a/src/config.h
+++ b/src/config.h
@@ -718,7 +718,7 @@ static FunctionMap FMAP [] = {
{ 0 }, EP_NONE, { "fs", NULL }, },
{ { "open_editor", "Open external editor" }, 1,
- (Func) commands_open_editor, "No input focused", ALWAYS_SM,
+ (Func) commands_open_editor, "No input focused", POST_SM,
{ 0 }, EP_NONE, { "editor", NULL }, },
};/*}}}*/
diff --git a/src/dwb.c b/src/dwb.c
index c5102a0c..119ab6b3 100644
--- a/src/dwb.c
+++ b/src/dwb.c
@@ -651,6 +651,7 @@ dwb_editor_watch(GPid pid, int status, EditorInfo *info) {
webkit_dom_html_input_element_set_value(WEBKIT_DOM_HTML_INPUT_ELEMENT(e), content);
if (WEBKIT_DOM_IS_HTML_TEXT_AREA_ELEMENT(e))
webkit_dom_html_text_area_element_set_value(WEBKIT_DOM_HTML_TEXT_AREA_ELEMENT(e), content);
+ webkit_dom_element_focus(e);
clean:
unlink(info->filename);