frontend: call setDesktopFileName earlier#13323
frontend: call setDesktopFileName earlier#13323leia-uwu wants to merge 1 commit intoobsproject:masterfrom
Conversation
Qt 6.10.1+ will register the dbus app ID when outside a sandbox, but that requires the desktop file name to be set earlier This fixes portal dialogs using Qt dbus having the wrong app name when launching OBS e.g via a terminal / not through the desktop file see leia-uwu/obs-wayland-hotkeys#5
|
note: portal dialogs that use gio dbus instead of qt dbus still don't seem get proper app IDs when launched from a terminal (like the pipewire screencast portal) :/ i'm not familiar with glib2 and gio APIs to figure out how and where to call the portal registry to also fix that, if someone could figure out how to also fix those it would be nice |
|
Does this still fix the issue that it was intended to fix in #5778? |
|
Please confirm that this has no regressions on older versions of Qt and when launching OBS Studio normally. |
|
yeah it shouldn't break anything, its just getting called earlier so Qt can know the app ID as early as possible the portal dbus registry needs to be called before any other portal dbus call as stated in the documentation: https://flatpak.github.io/xdg-desktop-portal/docs/doc-org.freedesktop.host.portal.Registry.html
before it was getting called too late / after other stuff already did portal dbus calls for older Qt versions I'm pretty sure it will change absolutely nothing, but i also can't easily test locally |
Portals expects the user to properly ran the application, running from a terminal (besides The registry portal is a crutch that should not be used unless necessary (toolkit using it without opt-in is not always the best thing). |
|
Moving But the "running from a terminal" and end up with the terminal ID is not fine as a justification. |
RytoEX
left a comment
There was a problem hiding this comment.
Commit message nits:
- Capitalize the first word after the prefix as if it is the first word of a sentence or title (i.e., "Call" instead of "call")
- Use "e.g.," instead of "e.g" (or drop it entirely)
- Use "or" instead of "/"
- Use punctuation at the end of sentences
Still looking for an approval from one of the other reviewers who might have a better idea about this change on Linux platforms.
Description
Qt 6.10.1+ will register the dbus app ID when outside a sandbox, but that requires the desktop file name to be set earlier
Motivation and Context
This fixes portal dialogs using Qt dbus having the wrong app name when launching OBS e.g via a terminal / not through the desktop file
see leia-uwu/obs-wayland-hotkeys#5
How Has This Been Tested?
I ran OBS with this patch and with my wayland hotkeys plugin from inside konsole and the portal dialog properly showed up as "OBS Studio" requesting the hotkeys instead of "Konsole"
Types of changes
Checklist: