g_memmove(brush, &(item->brush), sizeof(struct Brush));
undo->auxlist = g_list_append(undo->auxlist, brush);
// repaint the stroke
g_memmove(brush, &(item->brush), sizeof(struct Brush));
undo->auxlist = g_list_append(undo->auxlist, brush);
// repaint the stroke
if (item->canvas_item!=NULL) {
if (!item->brush.variable_width)
gnome_canvas_item_set(item->canvas_item,
if (item->canvas_item!=NULL) {
if (!item->brush.variable_width)
gnome_canvas_item_set(item->canvas_item,
+ // HACK TO BYPASS GTK+ 2.17 issue: crash if move text within selection
+ // also bypass: non-responsiveness of clicks in text box with 2.17 & 2.18
+ if (!gtk_check_version(2, 17, 0)) {
+ /* ask the canvas's leave-notify handler to disable
+ xinput when it's safe to do so... */
+ ui.need_emergency_disable_xinput = TRUE;
+ }
+
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);
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);
+
+ // HACK TO BYPASS GTK+ 2.17 issues
+ if (!gtk_check_version(2, 17, 0)) {
+ // re-enable XInput if needed (we disabled it during text edition)
+ gtk_widget_set_extension_events(GTK_WIDGET (canvas),
+ ui.use_xinput?GDK_EXTENSION_EVENTS_ALL:GDK_EXTENSION_EVENTS_NONE);
+ }
// finalize the text that's been edited...
buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(ui.cur_item->widget));
// finalize the text that's been edited...
buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(ui.cur_item->widget));