Help debugging Zathura window title issue

Hello,

I’m trying to help debug this issue in Zathura:

The window title does not appear and in the window switcher, the Zathura icon is not used. However, this seems to be limited to Wayland (Fedora 30 here) only. As upstream notes on the issue, girara merely calls gtk_window_set_title and seems to do it correctly too.

Would someone have any hints on where I could start debugging the issue please?

Package versions:

xorg-x11-server-Xwayland-1.20.5-4.fc30.x86_64
libwayland-egl-1.17.0-1.fc30.x86_64
zathura-pdf-poppler-0.2.9-3.fc30.x86_64
gtk3-3.24.10-1.fc30.x86_64
gnome-session-wayland-session-3.32.0-1.fc30.x86_64
zathura-ps-0.2.6-3.fc30.x86_64
zathura-cb-0.1.8-3.fc30.x86_64
libwayland-client-1.17.0-1.fc30.x86_64
libwayland-server-1.17.0-1.fc30.x86_64
libwayland-cursor-1.17.0-1.fc30.x86_64
zathura-0.4.3-2.fc30.x86_64
girara-0.3.2-2.fc30.x86_64

Cheers!

The title is being set, but the foreground color is #DDDDDD, which is almost invisible against the Adwaita background. Gtk always uses client-side decoration on Wayland, so when girara changes the CSS color for the window, it affects the titlebar too.

The GTK Inspector is very helpful for situations like this

1 Like

Ah! Thanks for that @chrisaw! I wasn’t even aware of the inspector. I’ve updated the upstream bug now, and we’ll work on what I hope should be a relatively simple fix for the titlebar.

Would you have any ideas on why the application icon won’t show too?

Wayland doesn’t have a concept of window icons, so gtk_window_set_icon_*() are not implemented in the gdk wayland backend.

The icon in the window switcher comes from the .desktop file, which means that gnome-shell must be able to match the window to the application. This requires setting the application id to match the .desktop file. The best way to do this is with GtkApplication and either GtkApplicationWindow or gtk_window_set_application(), but you can fix this minimally with:

g_set_prgname("org.pwmt.zathura");

For historical reasons, this call is recommended for GTK 3 even if you do use GtkApplication. Otherwise, the xdg-shell app_id will not match.

1 Like

Thanks Chris, that explains it. I’ll accept this as the answer and go open PRs at Zathura.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.