3
0
mirror of https://github.com/britzl/monarch.git synced 2025-09-28 02:22:20 +02:00

Make sure focus_lost messages is received

Fixes #42
This commit is contained in:
Björn Ritzl
2019-03-17 21:50:01 +01:00
parent b57609f061
commit 05f91dd763
8 changed files with 278 additions and 1 deletions

View File

@@ -0,0 +1,9 @@
local monarch = require "monarch.monarch"
function on_message(self, message_id, message, sender)
if message_id == monarch.FOCUS.GAINED then
_G.focus1_gained = true
elseif message_id == monarch.FOCUS.LOST then
_G.focus1_lost = true
end
end