aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKirill Chibisov <contact@kchibisov.com>2022-01-30 09:36:35 +0300
committerGitHub <noreply@github.com>2022-01-30 06:36:35 +0000
commitefae2cc80cb231081ce393fb922e6dcfc458260b (patch)
tree368b5757beac3915d615a29e1311bc8399321d91
parentf6651a997bd2af3f116d40d2a60b94c7508e00a1 (diff)
downloadalacritty-efae2cc80cb231081ce393fb922e6dcfc458260b.tar.gz
alacritty-efae2cc80cb231081ce393fb922e6dcfc458260b.zip
Log used display server on Linux/BSD
This also fixes a bug where the welcome log message wasn't logged.
-rw-r--r--alacritty/src/display/mod.rs2
-rw-r--r--alacritty/src/main.rs11
2 files changed, 10 insertions, 3 deletions
diff --git a/alacritty/src/display/mod.rs b/alacritty/src/display/mod.rs
index f2bf2ad7..d9ec8593 100644
--- a/alacritty/src/display/mod.rs
+++ b/alacritty/src/display/mod.rs
@@ -12,7 +12,7 @@ use std::{f64, mem};
use glutin::dpi::PhysicalSize;
use glutin::event::ModifiersState;
use glutin::event_loop::EventLoopWindowTarget;
-#[cfg(not(any(target_os = "macos", windows)))]
+#[cfg(all(feature = "x11", not(any(target_os = "macos", windows))))]
use glutin::platform::unix::EventLoopWindowTargetExtUnix;
use glutin::window::CursorIcon;
use log::{debug, info};
diff --git a/alacritty/src/main.rs b/alacritty/src/main.rs
index 6a86fcb1..70991871 100644
--- a/alacritty/src/main.rs
+++ b/alacritty/src/main.rs
@@ -20,6 +20,8 @@ use std::string::ToString;
use std::{fs, process};
use glutin::event_loop::EventLoop as GlutinEventLoop;
+#[cfg(not(any(target_os = "macos", windows)))]
+use glutin::platform::unix::EventLoopWindowTargetExtUnix;
use log::info;
#[cfg(windows)]
use winapi::um::wincon::{AttachConsole, FreeConsole, ATTACH_PARENT_PROCESS};
@@ -126,8 +128,6 @@ impl Drop for TemporaryFiles {
/// Creates a window, the terminal state, PTY, I/O event loop, input processor,
/// config change monitor, and runs the main display loop.
fn alacritty(options: Options) -> Result<(), String> {
- info!("Welcome to Alacritty");
-
// Setup glutin event loop.
let window_event_loop = GlutinEventLoop::<Event>::with_user_event();
@@ -135,6 +135,13 @@ fn alacritty(options: Options) -> Result<(), String> {
let log_file = logging::initialize(&options, window_event_loop.create_proxy())
.expect("Unable to initialize logger");
+ info!("Welcome to Alacritty");
+
+ #[cfg(all(feature = "x11", not(any(target_os = "macos", windows))))]
+ info!("Running on {}", if window_event_loop.is_x11() { "X11" } else { "Wayland" });
+ #[cfg(not(any(feature = "x11", target_os = "macos", windows)))]
+ info!("Running on Wayland");
+
// Load configuration file.
let config = config::load(&options);
log_config_path(&config);