summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 98ac533)
raw | patch | inline | side by side (parent: 98ac533)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Tue, 12 Sep 2006 18:05:28 +0000 (18:05 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Tue, 12 Sep 2006 18:05:28 +0000 (18:05 +0000) |
src/text-context.cpp | patch | blob | history |
diff --git a/src/text-context.cpp b/src/text-context.cpp
index 1185e08ef6053fcb593f15bf29d0d328bc2a0d31..26c6b42d753f3a99cb901725c8a642fab9666548 100644 (file)
--- a/src/text-context.cpp
+++ b/src/text-context.cpp
{
SPTextContext *tc = SP_TEXT_CONTEXT(ec);
+ if (ec->desktop) {
+ sp_signal_disconnect_by_data(sp_desktop_canvas(ec->desktop), tc);
+ }
+
ec->enableGrDrag(false);
tc->style_set_connection.disconnect();
gtk_object_destroy(*it);
}
tc->text_selection_quads.clear();
-
- if (ec->desktop) {
- sp_signal_disconnect_by_data(sp_desktop_canvas(ec->desktop), tc);
- }
}
{
GdkRectangle im_cursor = { 0, 0, 1, 1 };
+ // due to interruptible display, tc may already be destroyed during a display update before
+ // the cursor update (can't do both atomically, alas)
+ if (!tc->desktop) return;
+
if (tc->text) {
NR::Point p0, p1;
sp_te_get_cursor_coords(tc->text, tc->text_sel_end, p0, p1);
static void sp_text_context_update_text_selection(SPTextContext *tc)
{
+ // due to interruptible display, tc may already be destroyed during a display update before
+ // the selection update (can't do both atomically, alas)
+ if (!tc->desktop) return;
+
for (std::vector<SPCanvasItem*>::iterator it = tc->text_selection_quads.begin() ; it != tc->text_selection_quads.end() ; it++) {
sp_canvas_item_hide(*it);
gtk_object_destroy(*it);