Shell.AppSystem.get_default().get_running() don't recognize .desktop file, which is copied to ~/.local/share/applications manually
Affected version
Fedora 35
Gnome 41.2 on XOrg (I'll test it on Wayland later)
Bug summary
I create a .dektop file in VirtualBox and copy that created .desktop file into ~/.local/share/applications
. And launch it by clicking the icon, in the result of Shell.AppSystem.get_default().get_running()
, its id still like window:11
and is_window_backed()
returns true.
Steps to reproduce
- Create a machine in VirtualBox, the name is test.
- Click to pop up the context menu and choose
Create Shortcut on Desktop
, then a .desktop file namde test.desltop should apear in the~/Desktop
. - Copy
~/Desktop/test.desktop
to~/.local/share/applications
:cp ~/Desktop/test.desktop ~/.local/share/applications
- And wait second, gnome should be able to load it to the Overview - Appview. In Overview, search test and click to launch it.
- After launch, open
lg
viaAlt + F2 + type lg
. - In the
lg
, typeShell.AppSystem.get_default().lookup_app('test.desktop')
returns an object instance not null. - And then type
Shell.AppSystem.get_default().get_running()
, find it in the result, and its name isVirtualBox Machine
, its id is likewindow:11
andis_window_backed()
returns true.
What happened
The result of step 6 and step 7 is not matched.
And also, click the icon of test.desktop
on the Dash to pop up the context menu, don't have Add to Favorites
due to this issue.
What did you expect to happen
The result of step 6 and step 7 should be matched. In step 7, the id should be test.desktop
and the is_window_backed()
should return false.
And click the icon of test.desktop
on the Dash to pop up the context menu, should have Add to Favorites
.
Relevant logs, screenshots, screencasts etc.
Edited by nlpsuge