X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=src%2Fxo-paint.c;h=c865ac1c1880750bc7a49f80e53578b12bf40967;hb=cfd5ddfe5127ac20d01bd85c96ff16e39ca47696;hp=ba6ffffa694ff9140e3e47f0fd9b738a7da96805;hpb=881e9a45693f4d724512fdc5297ba312d447851b;p=xournal.git diff --git a/src/xo-paint.c b/src/xo-paint.c index ba6ffff..c865ac1 100644 --- a/src/xo-paint.c +++ b/src/xo-paint.c @@ -1211,8 +1211,9 @@ void start_text(GdkEvent *event, struct Item *item) GnomeCanvasItem *canvas_item; PangoFontDescription *font_desc; GdkColor color; - + get_pointer_coords(event, pt); + ui.cur_item_type = ITEM_TEXT; // HACK TO BYPASS GTK+ 2.17 issue: crash if move text within selection @@ -1267,13 +1268,13 @@ void start_text(GdkEvent *event, struct Item *item) item->canvas_item = canvas_item; gtk_widget_show(item->widget); - gtk_widget_grab_focus(item->widget); ui.resize_signal_handler = g_signal_connect((gpointer) winMain, "check_resize", G_CALLBACK(resize_textview), NULL); update_font_button(); gtk_widget_set_sensitive(GET_COMPONENT("editPaste"), FALSE); gtk_widget_set_sensitive(GET_COMPONENT("buttonPaste"), FALSE); + gtk_widget_grab_focus(item->widget); } void end_text(void) @@ -1425,7 +1426,6 @@ void process_font_sel(gchar *str) else *p=0; } else size=0.; - reset_focus(); g_free(ui.font_name); ui.font_name = str; if (size>0.) ui.font_size = size;