diff --git a/data/labwc-portals.conf b/data/labwc-portals.conf new file mode 100644 index 00000000..1a45f719 --- /dev/null +++ b/data/labwc-portals.conf @@ -0,0 +1,2 @@ +[preferred] +default=wlr;* diff --git a/data/labwc.desktop b/data/labwc.desktop index 63ffcfff..5b25c814 100644 --- a/data/labwc.desktop +++ b/data/labwc.desktop @@ -4,4 +4,4 @@ Comment=A wayland stacking compositor Exec=labwc Icon=labwc Type=Application -DesktopNames=wlroots +DesktopNames=labwc;wlroots diff --git a/docs/environment b/docs/environment index ad574bd9..90d7456a 100644 --- a/docs/environment +++ b/docs/environment @@ -60,13 +60,13 @@ ## ## This allows xdg-desktop-portal-wlr to function (e.g. for screen-recording). -## It is automatically set to "wlroots" by labwc though, so it is only +## It is automatically set to "labwc:wlroots" by labwc though, so it is only ## included here for completeness. Again, labwc will not over-write an ## already set environment variable, so if you need it set to something else, ## then uncomment and adjust. ## -# XDG_CURRENT_DESKTOP=wlroots +# XDG_CURRENT_DESKTOP=labwc:wlroots ## ## This causes a virtual output to be created automatically whenever there diff --git a/meson.build b/meson.build index e5ccae58..249c6e68 100644 --- a/meson.build +++ b/meson.build @@ -174,6 +174,8 @@ executable( install_data('data/labwc.desktop', install_dir: get_option('datadir') / 'wayland-sessions') +install_data('data/labwc-portals.conf', install_dir: get_option('datadir') / 'xdg-desktop-portal') + icons = ['labwc-symbolic.svg', 'labwc.svg'] foreach icon : icons icon_path = join_paths('data', icon) diff --git a/src/config/session.c b/src/config/session.c index b52b717a..3238369f 100644 --- a/src/config/session.c +++ b/src/config/session.c @@ -227,7 +227,7 @@ session_environment_init(void) * May be overridden either by already having a value set or by the user * supplied environment file. */ - setenv("XDG_CURRENT_DESKTOP", "wlroots", 0); + setenv("XDG_CURRENT_DESKTOP", "labwc:wlroots", 0); /* * Set default for _JAVA_AWT_WM_NONREPARENTING so that Java applications