mirror of
https://github.com/labwc/labwc.git
synced 2026-04-10 08:21:07 -04:00
main: Import systemd/dbus variables for portals
Initialize systemd and dbus with our relevant variables which are needed for some desktop portal use. This fixes things such as OBS screen casting not working. In the worst case, on non-systemd/dbus systems, this will just not do anything. Signed-off-by: Joshua Ashton <joshua@froggi.es>
This commit is contained in:
parent
dc9c4a93ae
commit
6b2b7e575c
1 changed files with 9 additions and 0 deletions
|
|
@ -92,6 +92,15 @@ main(int argc, char *argv[])
|
||||||
server_init(&server);
|
server_init(&server);
|
||||||
server_start(&server);
|
server_start(&server);
|
||||||
|
|
||||||
|
/* Initialize systemd and dbus with our relevant variables
|
||||||
|
* which are needed for some desktop portal use.
|
||||||
|
*
|
||||||
|
* This fixes things such as OBS screen casting not working.
|
||||||
|
* In the worst case, on non-systemd/dbus systems, this will just not do anything.
|
||||||
|
*/
|
||||||
|
system("systemctl --user import-environment DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP");
|
||||||
|
system("dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP");
|
||||||
|
|
||||||
struct theme theme = { 0 };
|
struct theme theme = { 0 };
|
||||||
theme_init(&theme, rc.theme_name);
|
theme_init(&theme, rc.theme_name);
|
||||||
rc.theme = &theme;
|
rc.theme = &theme;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue