From 69ed1e7aedba60d9b0e2053cc2017a8cb0aba3c9 Mon Sep 17 00:00:00 2001 From: Jeremy Fitzhardinge Date: Sat, 28 Dec 2019 22:51:55 -0800 Subject: [PATCH] Add focus_change to WindowCallbacks --- window/src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/window/src/lib.rs b/window/src/lib.rs index 7e2fe2acc..b8c1dbd5e 100644 --- a/window/src/lib.rs +++ b/window/src/lib.rs @@ -114,6 +114,9 @@ pub trait WindowCallbacks: Any { /// Called when the window is resized, or when the dpi has changed fn resize(&mut self, dimensions: Dimensions) {} + /// Called when window gains/loses focus + fn focus_change(&mut self, focused: bool) {} + /// Called when the window contents need painting. /// This is used only when the software renderer is enabled (which /// is the default). When the window is set to opengl mode, the