Gtk-3 stops rendering after temporary window resize to 0x0 (some wm's unfortunately do that)
Under some situations a window manager may forcefully set the window size to (nearly) 0x0. This causes Gtk-3 to stop rendering the window content. Even after resizing the window back to a normal size the rendering will stay broken.
Steps to reproduce
You may reproduce this with a KDE/Plasma Debian-12, Kubuntu-23.10 or openSUSE-15.5 live image in a VM.
https://download.opensuse.org/distribution/leap/15.5/live/openSUSE-Leap-15.5-KDE-Live-x86_64-Media.iso
There you need to install a Gtk-3 application like "Geany" or "Pavucontrol". (works same for both)
Debian/Kubuntu: sudo apt update; sudo apt install geany
SUSE: sudo zypper install geany
KDEs window manager (KWin) automatically resizes a window to (nearly) 0x0 on some occasions. This is what triggers the problem in normal workflows. But the problem can be more easily reproduced for debugging:
- start Geany
- Right click the window titlebar and choose:
More Actions
->Configure Special Window Settings
->Add Property
->Size
- There you set
Force
, 1x1 (0x0 doesn't work here) and clickApply
. Afterwards change the value to 500x500 and clickApply
again. - Press CTRL+w to close the file opened in Geany. You'll see the window title changing, so Geany didn't completely crash. But the content of the window stays frozen.
- You may press CTRL+n to open a new empty file and the window title will change again, but the window content will stay frozen.
Expected outcome
Window content shouldn't freeze.
Version information
- OS: Debian-12
- Same problem on openSUSE-15.5 and Kubuntu-23.10
- GTK: Gtk-3.24.38 (by Debian-12)
- Geany-1.38 or Pavucontrol-5.0
Additional information
On some occasions there's a Gtk output when running Geany from command line.
Gtk output
(geany:2449): Gtk-WARNING **: 22:29:35.573: Negative content width -6 (allocation 1, extents 4x3) while allocating gadget (node toolbar, owner GtkToolbar)
(geany:2449): Gtk-CRITICAL **: 22:29:35.573: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkNotebook
(geany:2449): Gdk-WARNING **: 22:29:35.574: Native Windows wider or taller than 32767 pixels are not supported