about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2024-05-19 22:41:52 -0700
committerKartik K. Agaram <vc@akkartik.com>2024-05-19 22:41:52 -0700
commit8219db2bcd31bee0f5cf5c4a92c3f6cd6a684e6d (patch)
treed13e18eb9bee7620339baafa3e8aefc2fccabeac
parentb6102d04897a795818cd43ff2d48e20417a927e5 (diff)
downloadtext.love-8219db2bcd31bee0f5cf5c4a92c3f6cd6a684e6d.tar.gz
mousefocus handler
-rw-r--r--main.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/main.lua b/main.lua
index 2cb7192..232308e 100644
--- a/main.lua
+++ b/main.lua
@@ -341,6 +341,17 @@ function App.wheelmoved(dx,dy)
   end
 end
 
+function App.mousefocus(in_focus)
+  if current_app_is_warning() then return end
+  if Current_app == 'run' then
+    if run.mouse_focus then run.mouse_focus(in_focus) end
+  elseif Current_app == 'source' then
+    if source.mouse_focus then source.mouse_focus(in_focus) end
+  else
+    assert(false, 'unknown app "'..Current_app..'"')
+  end
+end
+
 function love.quit()
   if Disable_all_quit_handlers then return end
   if current_app_is_warning() then return end
kspecs/ranger/commit/INSTALL?h=v1.2.0&id=f51bd48a141e4886a48c4f3d498a1c329bbaf193'>f51bd48a ^
7582555b ^







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45