lycheedev 3.2.3 → 3.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lycheedev",
3
- "version": "3.2.3",
3
+ "version": "3.2.5",
4
4
  "private": false,
5
5
  "description": "Unified native World of Warcraft development toolkit",
6
6
  "license": "MIT",
@@ -13,10 +13,14 @@ local function focus()
13
13
  end
14
14
  local function detach()
15
15
  if attached and attached:GetScript("OnKeyDown") == wrapper then
16
+ -- Keep ownership until restoration is legal; INPUT handles the
17
+ -- combat-end cleanup if the bridge is stopped in the meantime.
18
+ if InCombatLockdown() then return false end
16
19
  attached:SetScript("OnKeyDown", original)
17
20
  attached:SetPropagateKeyboardInput(propagation)
18
21
  end
19
22
  attached, original, wrapper, propagation = nil, nil, nil, nil
23
+ return true
20
24
  end
21
25
  local function eligible(editBox)
22
26
  if not editBox or editBox:IsForbidden() then return false end
@@ -28,7 +32,7 @@ local function eligible(editBox)
28
32
  return true
29
33
  end
30
34
  local function refresh()
31
- if not enabled then return false end
35
+ if not enabled or InCombatLockdown() then return false end
32
36
  local editBox = focus()
33
37
  if editBox == attached and attached and attached:GetScript("OnKeyDown") == wrapper then return true end
34
38
  detach()
@@ -37,8 +41,12 @@ local function refresh()
37
41
  local propagate = editBox:GetPropagateKeyboardInput()
38
42
  if restricted(prior) or restricted(propagate) then return false end
39
43
  local function onKeyDown(self, key, ...)
40
- self:SetPropagateKeyboardInput(propagate)
44
+ if enabled and not InCombatLockdown() then
45
+ self:SetPropagateKeyboardInput(propagate)
46
+ end
41
47
  if prior then prior(self, key, ...) end
48
+ -- The original handler may change state, so check again before
49
+ -- forwarding our shortcut.
42
50
  if not enabled or InCombatLockdown() or restricted(key) then return end
43
51
  local chord = ns.Compat.ReceiverChord(key)
44
52
  if not chord then return end
@@ -53,7 +61,7 @@ local function refresh()
53
61
  end
54
62
  ns.FocusBindings = {
55
63
  Refresh = refresh,
56
- Ready = function() return enabled and attached ~= nil and focus() == attached and attached:GetScript("OnKeyDown") == wrapper end,
64
+ Ready = function() return enabled and not InCombatLockdown() and attached ~= nil and focus() == attached and attached:GetScript("OnKeyDown") == wrapper end,
57
65
  Start = function()
58
66
  if enabled then return end
59
67
  enabled = true
@@ -64,8 +72,10 @@ ns.FocusBindings = {
64
72
  refresh()
65
73
  end,
66
74
  Stop = function()
67
- enabled = false
68
- ns.Compat.StopObservingChatFocus(callbackOwner)
69
- detach()
75
+ if enabled then
76
+ enabled = false
77
+ ns.Compat.StopObservingChatFocus(callbackOwner)
78
+ end
79
+ return detach()
70
80
  end,
71
81
  }
@@ -92,10 +92,20 @@ ns.InputState={
92
92
  -- Transaction completion refreshes facts without moving the periodic tick.
93
93
  Refresh=refresh,
94
94
  Stop=function()
95
- if ns.FocusBindings then ns.FocusBindings.Stop() end
95
+ local focusRestored=not ns.FocusBindings or ns.FocusBindings.Stop()
96
96
  if frame then
97
97
  frame:SetScript("OnUpdate",nil);frame:SetScript("OnEvent",nil)
98
98
  frame:SetScript("OnShow",nil);frame:SetScript("OnHide",nil);frame:UnregisterAllEvents()
99
+ if not focusRestored then
100
+ -- No INPUT or polling survives Stop. Only the owned EditBox
101
+ -- restoration waits for combat to end, on this existing frame.
102
+ frame:RegisterEvent("PLAYER_REGEN_ENABLED")
103
+ frame:SetScript("OnEvent",function(self)
104
+ if ns.FocusBindings.Stop() then
105
+ self:UnregisterAllEvents();self:SetScript("OnEvent",nil)
106
+ end
107
+ end)
108
+ end
99
109
  end
100
110
  provider,record,lastTick=nil,nil,nil
101
111
  hide()
@@ -1,6 +1,6 @@
1
1
  local ADDON_NAME, ns = ...
2
2
 
3
- ns.Release = "3.2.3"
3
+ ns.Release = "3.2.5"
4
4
  ns.Startup = { ready = false, reason = "addon_not_loaded" }
5
5
  _G.LycheeDevInternal = ns
6
6
 
@@ -1,6 +1,6 @@
1
1
  ## Interface: 120105, 120100, 50504, 38002, 16001, 11509, 20506
2
2
  ## Title: Lychee Dev
3
- ## Version: 3.2.3
3
+ ## Version: 3.2.5
4
4
  ## SavedVariables: LycheeToolkitDB
5
5
  ## SavedVariablesPerCharacter: LycheeToolkitBridgeDB
6
6
 
package/release.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "schema": "lycheedev.release.v1",
3
- "version": "3.2.3",
4
- "commit": "3766f9cacb52e93a803a626187e2a1d54a445468",
3
+ "version": "3.2.5",
4
+ "commit": "c3450d9a32d6ea1334f0209897cc02ab06502ba6",
5
5
  "binaries": {
6
6
  "windows-amd64": {
7
7
  "path": "native/windows-amd64/lycheedev.exe",
8
- "bytes": 24512000,
9
- "sha256": "4862cd7d79deaecff737d817b1ea7b3fbfa76c231cec4f97137cfe5b7a460f3e"
8
+ "bytes": 24516608,
9
+ "sha256": "50ec0895071493030c17ca7dfffcc2afac37c498929db4364b414e76164d5921"
10
10
  }
11
11
  },
12
12
  "resources": [
@@ -27,8 +27,8 @@
27
27
  },
28
28
  {
29
29
  "path": "addon/Bridge/FocusBindings.lua",
30
- "bytes": 2905,
31
- "sha256": "86b288def5c49653727c8c6eaef7cab2f60b64f57a58284eb447728e06ce2010"
30
+ "bytes": 3392,
31
+ "sha256": "0c8ee9b25be6b8a808b0c0ab0adfa75e08423770d4a50b92e5383b3dcfd343fc"
32
32
  },
33
33
  {
34
34
  "path": "addon/Bridge/InputProtection.lua",
@@ -37,8 +37,8 @@
37
37
  },
38
38
  {
39
39
  "path": "addon/Bridge/InputState.lua",
40
- "bytes": 5219,
41
- "sha256": "b6466861ba7caf3b9958932fc3e92318a504c4d790bd1e519b4b55c2198e43b1"
40
+ "bytes": 5740,
41
+ "sha256": "2750900fa26723415d0ab05aa6c58ae6e576f9302ca09459d975458a77d2be57"
42
42
  },
43
43
  {
44
44
  "path": "addon/Bridge/MemoryProtocol.lua",
@@ -113,7 +113,7 @@
113
113
  {
114
114
  "path": "addon/Core/Runtime.lua",
115
115
  "bytes": 2615,
116
- "sha256": "282cc677046af77325bd20c88fed24bcbb62aafddbe0bf7ff7ce1bb46dc454df"
116
+ "sha256": "7656ef90f8e8d54a5c7256d5790e70356e475184df7ae623595bbf1741405a76"
117
117
  },
118
118
  {
119
119
  "path": "addon/Core/Safety.lua",
@@ -143,7 +143,7 @@
143
143
  {
144
144
  "path": "addon/Lychee Dev.toc",
145
145
  "bytes": 2005,
146
- "sha256": "0b8f7eef49e6834e543576f6276224c43f4b288cc628e0e7564a40df03e4bedc"
146
+ "sha256": "3e09f73c195e8ccebb0b94b16f67dd46e684669a522ae5fa9e4adb3075d8e52b"
147
147
  },
148
148
  {
149
149
  "path": "addon/Media/GitHub.png",
@@ -6448,9 +6448,9 @@
6448
6448
  ],
6449
6449
  "correspondingSource": {
6450
6450
  "repository": "https://github.com/Follen/Lychee-Dev",
6451
- "commit": "3766f9cacb52e93a803a626187e2a1d54a445468",
6452
- "tag": "v3.2.3",
6453
- "archive": "lycheedev-3.2.3-corresponding-source.tar.gz",
6454
- "sha256": "280aa025099b50429977978c37e4af099e0ad5d5886cf8219760e5b9cadc38da"
6451
+ "commit": "c3450d9a32d6ea1334f0209897cc02ab06502ba6",
6452
+ "tag": "v3.2.5",
6453
+ "archive": "lycheedev-3.2.5-corresponding-source.tar.gz",
6454
+ "sha256": "0dc4a4c50f165e068d3b0b85508543951b13178bcbc6deb01ef83ed2fd7a650f"
6455
6455
  }
6456
6456
  }