X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=blobdiff_plain;f=src%2Fcompose.c;h=8f27aa95d99f3ffb9b74939f152d9c3c78dfef5b;hp=7ae586d402125dc37e3a27e7106f04b381760f86;hb=e7dd66a601ecd3f1cb93aeff6a9eb4bd855d1914;hpb=64387f9cc1ac81a1c78b9396cbf532ee916c4da0;ds=sidebyside diff --git a/src/compose.c b/src/compose.c index 7ae586d40..8f27aa95d 100644 --- a/src/compose.c +++ b/src/compose.c @@ -947,6 +947,7 @@ Compose *compose_generic_new(PrefsAccount *account, const gchar *mailto, FolderI gchar *mailto_from = NULL; PrefsAccount *mailto_account = NULL; MsgInfo* dummyinfo = NULL; + gint cursor_pos = -1; MailField mfield = NO_FIELD_PRESENT; gchar* buf; GtkTextMark *mark; @@ -1197,7 +1198,11 @@ Compose *compose_generic_new(PrefsAccount *account, const gchar *mailto, FolderI * is therefore created before placing the cursor */ case BODY_FIELD_PRESENT: - gtk_widget_grab_focus(compose->text); + cursor_pos = quote_fmt_get_cursor_pos(); + if (cursor_pos == -1) + gtk_widget_grab_focus(compose->header_last->entry); + else + gtk_widget_grab_focus(compose->text); break; } @@ -1212,7 +1217,7 @@ Compose *compose_generic_new(PrefsAccount *account, const gchar *mailto, FolderI compose->modified = FALSE; compose_set_title(compose); - hooks_invoke(COMPOSE_CREATED_HOOKLIST, compose); + hooks_invoke(COMPOSE_CREATED_HOOKLIST, compose); return compose; }