Skip to content

applets/comic: enforce minimum FullViewWidget size

Christoph Wolk requested to merge cwo/kdeplasma-addons:dont_hang_plasma into master

The comic applet contains a prominent button that shows the current comic full size in a popup window. In case there is no image (and no fallback), the opened pop-up has a size of 0, and the applet goes into a permanent loop trying to handle this. If the applet is running in plasmashell, this will hang plasmashell completely.

This change enforces a minimum popup size of 70×70 pixels; this is enough to show a visible window, but should still be smaller than even a small realistic comic.

Test plan

(Maybe do this with plasmoidviewer, or be ready to kill plasmashell)

Add comics widget, load any non-functioning comic plugin (e.g. the top suggested one, "A Programmer's Life"), configure the applet to show it, wait for it to load and fail. Press the full screen button, observe the neverending "QML ScrollView: Possible anchor loop detected on fill." errors hanging plasmoidviewer (or plasmashell).

Test it with the patch to verify this fixes the issue.

Note

The comic applet seems to have a function (configurable) that displays the error as an image, but I haven't gotten this to work on either 5.27, 6.1.4 or git master. In any case, it might make sense to switch this to PlaceholderMessage anyway, for visual consistency.

Merge request reports