GTK4 applications do not resize

Hello!
I’m not sure this is the right place to ask this question so sorry if I’m wrong.

I’m using Ultramarine Linux 40 (kind of a fork of Fedora Linux) w/ GNOME 46 and Wayland on Lenovo X1 laptop.

The issue is, native GNOME applications do not have window resize ability (?), i.e. when I position cursor on border of a window of Files/Software/Text Editor etc., it does not change to arrow and I am unable to drag the application border and resize the application window. Non-GNOME applications however (LibreOffice/FF/VLC/…) do not reproduce this behaviour, i.e. the cursor changes its shape and I can resize the windows arbitrarily.

Is there any way to fix this?

Hi, I think there can be a multitude of things at play here, it might be best to check with your distribution if you haven’t done so yet. Maybe try switching between Wayland and Xorg on the login screen (via the cog in the bottom right) and see if there is any difference.

2 Likes

FWIW, it works fine in ultramarine-gnome-40-live-x86_64.iso live image in GNOME Boxes.

Recording

1 Like

Thank you, I tried it and it works in Boxes perfectly.

BTW, I just installed GNOME Boxes through Flatpak, and the Boxes itself, as well as file picker in Boxes application work also as they should, but other GNOME applications I have in system do still not.

Did as you suggested, under Xorg everything works as expected. Funny, but when I logged back to Wayland, the application windows and even the file picker window became the size I made them under Xorg session. So I logged back to Xorg again and resized every GNOME application to the size I would it like to be, and after that switched back to Wyaland. It’s crap of issue solution of course, but it’s better than nothing anyway. At least I see more than five rows of filenames in file picker when saving/opening files.

Can you list a few ?

FWIW, Boxes is GTK3 app. Probably, you’re experiencing the resize issue only with GTK4 / libadwaita apps in your system. Since all apps (GTK3 and GTK4/libadwaita) work fine in Boxes (iiuc), then the issue is probably due to some hardware / environment issues specific to your system.

In which case, try running the problematic apps from the command line and share the output.

❯ nautilus

** Message: 07:35:57.689: Connecting to org.freedesktop.Tracker3.Miner.Files
(org.gnome.Nautilus:9400): Gtk-WARNING **: 07:42:23.672: Unknown key gtk-modules in /home/kidd79/.config/gtk-4.0/settings.ini

❯ epiphany

(epiphany:8832): Gtk-WARNING **: 07:37:12.308: Unknown key gtk-modules in /home/kidd79/.config/gtk-4.0/settings.ini
MESA-INTEL: warning: ../src/intel/vulkan/anv_formats.c:763: FINISHME: support YUV colorspace with DRM format modifiers
MESA-INTEL: warning: ../src/intel/vulkan/anv_formats.c:794: FINISHME: support more multi-planar formats with DRM modifiers

❯ gnome-text-editor

(gnome-text-editor:9945): Gtk-WARNING **: 07:46:01.395: Unknown key gtk-modules in /home/kidd79/.config/gtk-4.0/settings.ini
(gnome-text-editor:9945): Gtk-WARNING **: 07:46:07.108: Finalizing GtkSourceGutter 0x55d948b68100, but it still has children left:
   - GtkSourceGutterRendererLines 0x55d948b6b730

❯ loupe
(loupe:10102): Gtk-WARNING **: 07:47:46.596: Unknown key gtk-modules in /home/kidd79/.config/gtk-4.0/settings.ini

OK, I see the pattern here. Not sure however what to do here. Here’s the content of that settings.ini file:

[Settings]
gtk-application-prefer-dark-theme=0
gtk-cursor-theme-name=breeze_cursors
gtk-cursor-theme-size=24
gtk-decoration-layout=icon:minimize,maximize,close
gtk-enable-animations=true
gtk-font-name=Noto Sans,  10
gtk-icon-theme-name=breeze-dark
gtk-modules=colorreload-gtk-module:window-decorations-gtk-module
gtk-primary-button-warps-slider=true
gtk-sound-theme-name=ocean
gtk-xft-dpi=122880

How safe is to delete the line with this “gtk modules” thing?
UPD: Tried, did not work.

On the other hand, the GNOME Terminal itself works fine. Evince (Document Viewer), Disks (gnome-disk-utility 46.1 UDisks 2.10.1 (built against 2.10.1)) - but not DisksUsageAnaliser also do.

Sounds like the issue is between GTK3 and GTK4, as the applications you listed as working are still using GTK3.

Just to make sure, resizing does not work at all? As in, even if you position the cursor in the correct place and try to resize without seeing an appropriate cursor, it does not work?

A quick search did not yield in any issues matching this description: Issues · GNOME / gtk · GitLab

You may be using a cursor theme that is missing icons—namely the ones used to display resizing. The cursor icon is loaded client-side by the toolkit under Wayland.

Try using the Adwaita cursor theme, if you (or your distribution) is using a different cursor theme.

Well I submitted the issue in gnome gitlab and did some research with people there and at some moment I find out that (though I don’t know if it was always like this or I changed something that affected the behaviour) - found out that “correct place” to position the cursor is not on the windows border, but some ~2mm outside the border. Indeed, if I just put the cursor there or move around, nothing happens. However if I press mouse button while the arrow is in the correct (i.e. ~2mm out) position and do not release it, the cursor changes to correct resizing shape and I can resize the window. However it is impossble to say whether or not the cursor is in the correct postion unless you press the mouse button. And if the mouse button was pressed in the wrong place, mving the mouse around does not help, I have to release the button and try again in another place.

Never changed the cursor theme and - checked it to be sure right now - it’s Adwaita (default) rn. Please see also my reply to Peter Eisenmann above - looks like I was wrong in issue description and it’s completely GTK4-related thing (window borders in wrong place and not causing cursor change).

It looks like - despite what Settings show - the cursor theme was changed somehow and sometimes.

This command fixed the issue:

gsettings reset org.gnome.desktop.interface cursor-theme