Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set the desktop filename of the Qt application #774

Merged
merged 1 commit into from
Apr 25, 2024

Commits on Apr 25, 2024

  1. Set the desktop filename and app name of the Qt application

    Currently, the app ID of the Dangerzone GUI application when running
    under Wayland is `python3`, which is not very useful if one wants to
    automate some action related to the Dangerzone application window (e.g.
    to always start Dangerzone window in floating mode under Sway WM).
    
    Setting the desktop filename property also sets the app ID of the
    application under Wayland. According to Qt documentation[1], the
    property value should be the name of the application's .desktop file but
    without the extension.
    
    Qt documentation also states:
    
    > This property gives a precise indication of what desktop entry
    > represents the application and it is needed by the windowing system to
    > retrieve such information without resorting to imprecise heuristics.
    
    Therefore I also think that setting this property is needed to display
    the correct application name and icon (taken from the .desktop entry)
    when running under certain windowing systems (like Wayland)
    (see also freedomofpress#402).
    
    Note that this property is not enough, as we've encountered systems
    where setting just the desktop file name does not alter the detected
    application name by the window manager. For this reason, we also use
    set the application name [2] to `dangerzone`, to remove any ambiguity.
    
    [1]: https://doc.qt.io/qt-6/qguiapplication.html#desktopFileName-prop
    [2]: https://doc.qt.io/qt-6/qcoreapplication.html#applicationName-prop
    
    Fixes freedomofpress#402
    naglis authored and apyrgio committed Apr 25, 2024
    Configuration menu
    Copy the full SHA
    8cdb2d5 View commit details
    Browse the repository at this point in the history