https://bugs.kde.org/show_bug.cgi?id=522404

            Bug ID: 522404
           Summary: Window fallback icon should be a real generic
                    "application" icon, not the Xorg or Wayland icon
    Classification: Plasma
           Product: kwin
      Version First 6.7.1
       Reported In:
          Platform: Arch Linux
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

DESCRIPTION
Currently for apps that aren't setting their icons correctly, if it is a native
Wayland application it will get the Wayland icon as a fallback, and if it is an
Xwayland application it will get the Xorg icon as a fallback.

This should be a generic application icon instead, as the Wayland and Xorg
icons aren't supposed to mean "a generic application", even though years of
Plasma doing this has taught that to existing users.

STEPS TO REPRODUCE
1. Open an Xwayland app that does not set its window icon properly.

   One example is this simple Perl + Tk script:

       #!/usr/bin/env perl
       use Tk;
       MainWindow->new()->geometry("600x200");
       MainLoop();

2. Open another native Wayland app that does not set its window icon properly.

    One example is this simple Gjs script (GTK 3):

       #!/usr/bin/env -S gjs -m
       import Gtk from 'gi://Gtk?version=3.0';
       Gtk.init(null);
       let win = new Gtk.Window();
       win.connect("delete-event", () => Gtk.main_quit());
       win.show_all();
       Gtk.main();

OBSERVED RESULT
A semantically accurate fallback icon is used, like application-x-executable.

EXPECTED RESULT
The Wayland icon is used for a Wayland app, and the Xorg icon is used for an
Xwayland app.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.7.1
KDE Frameworks Version: 6.27.0
Qt Version: 6.11.1
Kernel Version: 6.18.36-1-lts (64-bit)
Graphics Platform: Wayland

ADDITIONAL INFORMATION
The "xorg" icon fallback is, as far as I can tell, set by kwindowsystem's
kx11extras.cpp, at
https://invent.kde.org/frameworks/kwindowsystem/-/blob/1da2c5b1919/src/kx11extras.cpp#L826
so this would also be an kwindowsystem bug, except since a bug can only be
attached to one product I've attached this to just Kwin.

The "wayland" icon fallback is set by kwin's xdgshellwindow.cpp, at
https://invent.kde.org/plasma/kwin/-/blob/cd46f9c9c/src/xdgshellwindow.cpp#L1532
It also seems to be set by kwayland, at
https://invent.kde.org/plasma/kwayland/-/blob/900bc99a69/src/client/plasmawindowmanagement.cpp#L732

I suggest application-x-executable as this is what is already used by GNOME and
Xfce. This is not to suggest doing things just because other environments are
doing it, but since (a) application-x-executable does suggest "generic
application" far more strongly than the "xorg" and "wayland" icons, and (b) it
is already used by other environments for this purpose, I think it's just the
best option for this purpose.
Reference (sorry, using their github mirrors for cross-repo code search):
xfce:
https://github.com/search?q=org%3Axfce-mirror%20%22application-x-executable%22&type=code
gnome:
https://github.com/search?q=org%3AGNOME%20%22application-x-executable%22&type=code

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to