#1034289 inkscape: canvas stops updating completely when trying to edit a text box

Package:
inkscape
Source:
inkscape
Description:
vector-based drawing program
Submitter:
Giuseppe Bilotta
Date:
2025-04-29 09:09:02 UTC
Severity:
normal
Tags:
#1034289#5
Date:
2023-04-12 11:12:32 UTC
From:
To:
Adding or editing a text box causes the canvas to stop updating
altogether. Writing, selecting, etc still works, but the canvas does not
refresh anymore until Inkscape is closed and reopened.
This is also with the Preferences > Rendering > Update strategy
set to "Full redraw".

#1034289#10
Date:
2023-04-12 13:39:45 UTC
From:
To:
Additional information: the issue I'm seeing seems to match upstream
issue #3664
https://gitlab.com/inkscape/inkscape/-/issues/3664
and seems to be related to a GTK bug when GTK_IM_MODULE=xim
Unsetting the variable or testing one of the values recommended in the
comments to the bug solves the issue for me.

#1034289#15
Date:
2023-04-21 00:40:24 UTC
From:
To:
Dear Maintainer (and cc'ing the GTK-GNOME list),

Following on from Giuseppe's upstream link:

... to a further-upstream bug[1] in the GTK issue tracker, there's a reference
to GDK window repainting as the possible cause[2] (with a suggested fix).

The (untested) patch I've attached here applies the suggested change to
src:gtk+3.0 (and was created from version gtk+3.0-3.24.37 of it).

I don't yet have an environment prepared to build and test it, but will try to
create one soon.

Thanks,
James

[1] - https://gitlab.gnome.org/GNOME/gtk/-/issues/2560

[2] - https://gitlab.gnome.org/GNOME/gtk/-/issues/2560#note_757809

#1034289#22
Date:
2023-04-22 22:46:49 UTC
From:
To:
After installing a fresh Debian bookworm system and installing the 'inkscape'
package (version 1.2.2-2+b1), I can confirm that this issue is reproducible; it
can be found by running:

  $ GTK_IM_MODULE=xim inkscape

... and from there, attempting to create or edit text objects (shortcut: 'T')
within a document (for example, after creating a new blank SVG document).

I'm planning to attempt a rebuild of GTK3 with the previously-attached patch[1]
and then rebuilding src:inkscape against that to confirm whether the patch
resolves the problem.

[1] - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1034289#15

#1034289#27
Date:
2023-04-24 11:52:37 UTC
From:
To:
After testing the patch (that is based on a suggestion in an upstream GTK bug
discussion thread[1]), I can confirm that it resolves the canvas-refresh issue
reported in Inkscape (that depends on libgtk-3-0 for window rendering).

Based on that, I'm reassigning this bug to the package where the problem seems
to originate and be fixable.

Although this bug does seem RC-severity for Inkscape, it seems possible that
the severity should be reduced in the context of libgtk, since that is a
dependency of many other packages, few of which are likely to be affected (a
call to 'gdk_window_ensure_native' is required as a minimum for the problem to
occur, according to a repro test case[2]).

I'll provide related updates on the upstream discussion thread(s).

[1] - https://gitlab.gnome.org/GNOME/gtk/-/issues/2560#note_757809

[2] - https://gitlab.gnome.org/GNOME/gtk/-/issues/2560#note_757066

#1034289#40
Date:
2023-04-24 12:42:28 UTC
From:
To:
Hi Giuseppe,

If possible: can you share some more information about your use-case for XIM
as an input method (either with Inkscape in particular, or more generally on
the relevant system(s)).

Thanks,
James

#1034289#45
Date:
2023-04-25 08:17:39 UTC
From:
To:
As mentioned previously: although this bug seemed RC-level in the context of
Inkscape, libgtk3 has a sizable set of dependent packages, so in that context,
and given that release-preparation time is finite, I think we should reduce the
severity.  (despite that, I intend to track this bug fairly closely because I'm
interested in the results)

#1034289#54
Date:
2023-11-06 23:02:08 UTC
From:
To:
Please note: inkscape upstream currently plans to workaround this issue by
disabling the GTK XIM input method when it is detected as selected in the
user's environment settings.  That change is currently planned[1] to be
included in the v1.3.1 release of inkscape.

From that version onwards, this bug should become no-longer-reproducible.
For anyone curious to approximate the workaround before then, XIM can be
temporarily disabled within a single inkscape session by specifying a
different GTK input method module; for example:

  $ GTK_IM_MODULE=gtk-im-context-simple inkscape

(quoted as a workaround in the upstream bug thread[2])

(also, happy 20th birthday[3], Inkscape!)

[1] - https://gitlab.com/inkscape/inkscape/-/merge_requests/5236

[2] - https://gitlab.com/inkscape/inkscape/-/issues/3664

[3] - https://inkscape.gitlab.io/inkscape-docs/awesome-web-pages/20th_anniversary/

#1034289#59
Date:
2025-04-29 09:06:28 UTC
From:
To:
I'm no longer able to replicate this problem using inkscape 1.4, as
currently packaged in Debian testing (trixie).  Please note that this
seems to be related to intentional removal of support for the XIM
input module by the upstream codebase.