From b9ec141c927b333bfea5d8a285deedd164181dd8 Mon Sep 17 00:00:00 2001 From: ns Date: Sun, 28 May 2017 05:08:28 +0200 Subject: Find and set $WINDOWID to X11 window ID (#586) --- src/main.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 7c377f2b..b7db4dec 100644 --- a/src/main.rs +++ b/src/main.rs @@ -98,12 +98,15 @@ fn run(mut config: Config, options: cli::Options) -> Result<(), Box> { let terminal = Term::new(&config, display.size().to_owned()); let terminal = Arc::new(FairMutex::new(terminal)); + // Find the window ID for setting $WINDOWID + let window_id = display.get_window_id(); + // Create the pty // // The pty forks a process to run the shell on the slave side of the // pseudoterminal. A file descriptor for the master side is retained for // reading/writing to the shell. - let mut pty = tty::new(&config, &options, display.size()); + let mut pty = tty::new(&config, &options, display.size(), window_id); // Create the pseudoterminal I/O loop // -- cgit v1.2.3-54-g00ecf