Enable use of GAMESCOPE_WAYLAND_DISPLAY

This commit is contained in:
Luke Jones
2025-02-02 20:02:51 +13:00
parent 5c2bcad7c6
commit dac35996b1
2 changed files with 8 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
use std::env::args; use std::env::{self, args};
use std::path::{Path, PathBuf}; use std::path::{Path, PathBuf};
use std::process::exit; use std::process::exit;
use std::sync::{Arc, Mutex}; use std::sync::{Arc, Mutex};
@@ -32,6 +32,12 @@ async fn main() -> Result<()> {
.format_timestamp(None) .format_timestamp(None)
.init(); .init();
// If we're running under gamescope we have to set WAYLAND_DISPLAY for winit to
// use
if let Ok(gamescope) = env::var("GAMESCOPE_WAYLAND_DISPLAY") {
env::set_var("WAYLAND_DISPLAY", gamescope);
}
// Try to open a proxy and check for app state first // Try to open a proxy and check for app state first
{ {
let user_con = zbus::blocking::Connection::session()?; let user_con = zbus::blocking::Connection::session()?;

View File

@@ -2,7 +2,7 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2025-02-01 07:27+0000\n" "POT-Creation-Date: 2025-02-01 07:31+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"