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

Add labwc to XDG_CURRENT_DESKTOP to support a portals.conf #1716

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions data/labwc-portals.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[preferred]
default=wlr;*
2 changes: 1 addition & 1 deletion data/labwc.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ Comment=A wayland stacking compositor
Exec=labwc
Icon=labwc
Type=Application
DesktopNames=wlroots
DesktopNames=labwc;wlroots
4 changes: 2 additions & 2 deletions docs/environment
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,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)
Expand Down
2 changes: 1 addition & 1 deletion src/config/session.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,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
Expand Down