From 50acfc2119259d87d7086d7f92c3af9e7ca0f0b2 Mon Sep 17 00:00:00 2001 From: Tassilo Horn Date: Fri, 22 Jan 2021 10:17:57 +0100 Subject: [PATCH] Fix demon crash when off-screen windows are created --- src/ipc.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ipc.rs b/src/ipc.rs index 42628c5..84c7f62 100644 --- a/src/ipc.rs +++ b/src/ipc.rs @@ -6,13 +6,14 @@ use serde::{Deserialize, Serialize}; pub type Id = u32; pub type Dim = u16; +pub type Pos = i16; // Position can be off-screen, so i16 instead of u16. pub type Pid = u32; #[derive(Deserialize, Debug)] #[allow(dead_code)] pub struct Rect { - pub x: Dim, - pub y: Dim, + pub x: Pos, + pub y: Pos, pub width: Dim, pub height: Dim, }