mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Enable use of GAMESCOPE_WAYLAND_DISPLAY
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use std::env::args;
|
||||
use std::env::{self, args};
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::process::exit;
|
||||
use std::sync::{Arc, Mutex};
|
||||
@@ -32,6 +32,12 @@ async fn main() -> Result<()> {
|
||||
.format_timestamp(None)
|
||||
.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
|
||||
{
|
||||
let user_con = zbus::blocking::Connection::session()?;
|
||||
|
||||
Reference in New Issue
Block a user