From 227d58725d36800bff642dfa507c262bd3cc6729 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Sun, 20 Dec 2020 16:03:05 +0100 Subject: [PATCH] Platform/Unix/X11Display.cpp: Set and unset focused_display variable when the display receives FocusIn/Out events. --- source/Platform/Unix/X11Display.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/Platform/Unix/X11Display.cpp b/source/Platform/Unix/X11Display.cpp index 556e601..c3eecf4 100644 --- a/source/Platform/Unix/X11Display.cpp +++ b/source/Platform/Unix/X11Display.cpp @@ -275,9 +275,11 @@ void X11Display::processEvent(const ::XEvent& event) break; case FocusIn: Log::debug("X11: FocusIn"); + _priv::focused_display = this; break; case FocusOut: Log::debug("X11: FocusOut"); + _priv::focused_display = NULL; break; } }