ipc: Don't re-export socket types
Browse files at this commit9ab887bec891db61b7f97428dc803f417ed9640aParent: 268591f3 changed files +6 -6
- niri-ipc/src/lib.rs +1 -3
- src/ipc/client.rs +2 -1
- src/main.rs +3 -2
niri-ipc/src/lib.rsmodified+1 -3
| @@ -6,9 +6,7 @@ use std::str::FromStr; | ||
| 6 | 6 | |
| 7 | 7 | use serde::{Deserialize, Serialize}; |
| 8 | 8 | |
| 9 | -mod socket; | |
| 10 | -pub use socket::{Socket, SOCKET_PATH_ENV}; | |
| 11 | - | |
| 9 | +pub mod socket; | |
| 12 | 10 | pub mod state; |
| 13 | 11 | |
| 14 | 12 | /// Request from client to niri. |
src/ipc/client.rsmodified+2 -1
| @@ -1,7 +1,8 @@ | ||
| 1 | 1 | use anyhow::{anyhow, bail, Context}; |
| 2 | +use niri_ipc::socket::Socket; | |
| 2 | 3 | use niri_ipc::{ |
| 3 | 4 | Event, KeyboardLayouts, LogicalOutput, Mode, Output, OutputConfigChanged, Request, Response, |
| 4 | - Socket, Transform, | |
| 5 | + Transform, | |
| 5 | 6 | }; |
| 6 | 7 | use serde_json::json; |
| 7 | 8 |
src/main.rsmodified+3 -2
| @@ -24,6 +24,7 @@ use niri::utils::spawning::{ | ||
| 24 | 24 | use niri::utils::watcher::Watcher; |
| 25 | 25 | use niri::utils::{cause_panic, version, IS_SYSTEMD_SERVICE}; |
| 26 | 26 | use niri_config::Config; |
| 27 | +use niri_ipc::socket::SOCKET_PATH_ENV; | |
| 27 | 28 | use portable_atomic::Ordering; |
| 28 | 29 | use sd_notify::NotifyState; |
| 29 | 30 | use smithay::reexports::calloop::EventLoop; |
| @@ -191,7 +192,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> { | ||
| 191 | 192 | |
| 192 | 193 | // Set NIRI_SOCKET for children. |
| 193 | 194 | if let Some(ipc) = &state.niri.ipc_server { |
| 194 | - env::set_var(niri_ipc::SOCKET_PATH_ENV, &ipc.socket_path); | |
| 195 | + env::set_var(SOCKET_PATH_ENV, &ipc.socket_path); | |
| 195 | 196 | info!("IPC listening on: {}", ipc.socket_path.to_string_lossy()); |
| 196 | 197 | } |
| 197 | 198 | |
| @@ -262,7 +263,7 @@ fn import_environment() { | ||
| 262 | 263 | "WAYLAND_DISPLAY", |
| 263 | 264 | "XDG_CURRENT_DESKTOP", |
| 264 | 265 | "XDG_SESSION_TYPE", |
| 265 | - niri_ipc::SOCKET_PATH_ENV, | |
| 266 | + SOCKET_PATH_ENV, | |
| 266 | 267 | ] |
| 267 | 268 | .join(" "); |
| 268 | 269 |