Skip to content

main: Present application window#14

Merged
pojntfx merged 1 commit intopojntfx:mainfrom
agx:window
Sep 22, 2025
Merged

main: Present application window#14
pojntfx merged 1 commit intopojntfx:mainfrom
agx:window

Conversation

@agx
Copy link
Contributor

@agx agx commented Sep 20, 2025

Marking it as visible before adding it to the AdwApplication has the negative side effect that things like app_id will be inferred from defaults rather than from the application object.

This fixes e.g. the missing icon on phosh as the app-id is now correct:

$ WAYLAND_DEBUG=1 flatpak run  com.pojtinger.felicitas.Sessions |& grep -i "xdg.*set_app_id"
[1660879.185]  -> xdg_toplevel#64.set_app_id("com.pojtinger.felicitas.Sessions")

Closes: #6
Signed-off-by: Guido Günther agx@sigxcpu.org

@agx
Copy link
Contributor Author

agx commented Sep 20, 2025

It might also make sense to use AdwApplicationWindow instead of AdwWindow (to get the actions, etc) but that's unrelated to the icon issue.

Marking it as `visible` before adding it to the `AdwApplication` has the
negative side effect that things like `app_id` will be inferred from
defaults rather than from the application object.

This fixes e.g. the missing icon on phosh as the app-id is now correct:

```
$ WAYLAND_DEBUG=1 flatpak run  com.pojtinger.felicitas.Sessions |& grep -i "xdg.*set_app_id"
[1660879.185]  -> xdg_toplevel#64.set_app_id("com.pojtinger.felicitas.Sessions")
```

Closes: pojntfx#6
Signed-off-by: Guido Günther <agx@sigxcpu.org>
@pojntfx
Copy link
Owner

pojntfx commented Sep 22, 2025

Thanks a lot for the fix @agx! I didn't know the the initialisation order is important, that is good to know. I'll make sure to use AdwApplicationWindow in the future - I'm switching over to using proper subclassing with a new Go GTK binding (puregotk) that should make that even easier.

@pojntfx
Copy link
Owner

pojntfx commented Sep 22, 2025

Tested this locally, looks all good to me:

Screenshot of the app running with the icon in the overview

@pojntfx pojntfx merged commit 75f59bb into pojntfx:main Sep 22, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Application has no icon in overview when running on pmOS / Phosh

2 participants