Skip to content

Commit d022169

Browse files
Fix global hover cursor regression
1 parent 20c5762 commit d022169

4 files changed

Lines changed: 18 additions & 24 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ All notable user-visible changes to OverflowBar are documented here.
44

55
## [Unreleased]
66

7+
## [1.0.10] - 2026-08-03
8+
9+
- Removed the synthetic session-wide `mouseMoved` event used after layout moves, which could force other applications to keep the arrow cursor until mouse-down.
10+
- Keep Pointer and text-edit I-beam hover states entirely under the active application while still preserving the physical cursor position during layout changes.
11+
712
## [1.0.9] - 2026-08-03
813

914
- Normalize Control Center window identities so generic items such as Feishu remain selected and hidden across WindowServer refreshes.
@@ -82,7 +87,8 @@ All notable user-visible changes to OverflowBar are documented here.
8287

8388
- Initial public release with item discovery, selection, managed hiding, second-row presentation, and hybrid activation.
8489

85-
[Unreleased]: https://github.com/EvanProgramming/OverflowBar/compare/v1.0.9...HEAD
90+
[Unreleased]: https://github.com/EvanProgramming/OverflowBar/compare/v1.0.10...HEAD
91+
[1.0.10]: https://github.com/EvanProgramming/OverflowBar/compare/v1.0.9...v1.0.10
8692
[1.0.9]: https://github.com/EvanProgramming/OverflowBar/compare/v1.0.8...v1.0.9
8793
[1.0.8]: https://github.com/EvanProgramming/OverflowBar/compare/v1.0.7...v1.0.8
8894
[1.0.7]: https://github.com/EvanProgramming/OverflowBar/compare/v1.0.6...v1.0.7

‎OverflowBar/Resources/Info.plist‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<key>CFBundleInfoDictionaryVersion</key><string>6.0</string>
88
<key>CFBundleName</key><string>$(PRODUCT_NAME)</string>
99
<key>CFBundlePackageType</key><string>APPL</string>
10-
<key>CFBundleShortVersionString</key><string>1.0.9</string>
10+
<key>CFBundleShortVersionString</key><string>1.0.10</string>
1111
<key>CFBundleVersion</key><string>9</string>
1212
<key>LSUIElement</key><true/>
1313
<key>LSApplicationCategoryType</key><string>public.app-category.utilities</string>

‎OverflowBar/Services/MenuBarLayoutManager.swift‎

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ final class MenuBarLayoutManager {
6262
move(item, relativeTo: target.id, placement: .right, completion: completion)
6363
}
6464

65-
func rehide(_ item: MenuBarItem, restoreCursorLocation: CGPoint? = nil, completion: @escaping (Bool) -> Void = { _ in }) {
65+
func rehide(_ item: MenuBarItem, completion: @escaping (Bool) -> Void = { _ in }) {
6666
guard isEnabled, let target = hiddenTargetWindow() else { completion(false); return }
67-
move(item, relativeTo: target.id, placement: .left, restoreCursorLocation: restoreCursorLocation, completion: completion)
67+
move(item, relativeTo: target.id, placement: .left, completion: completion)
6868
}
6969

7070
func restore(_ items: [MenuBarItem], relativeTo controlFrame: CGRect, completion: @escaping (Int) -> Void = { _ in }) {
@@ -154,7 +154,6 @@ final class MenuBarLayoutManager {
154154
}
155155

156156
private func move(_ item: MenuBarItem, relativeTo targetWindowID: CGWindowID, placement: Placement, attempt: Int = 1, restoreCursorLocation: CGPoint? = nil, completion: @escaping (Bool) -> Void) {
157-
let physicalPointerLocation = restoreCursorLocation ?? CGEvent(source: nil)?.location
158157
guard let itemWindowID = item.windowID, let ownerPID = item.ownerPID,
159158
currentFrame(windowID: itemWindowID) != nil,
160159
let targetFrame = currentFrame(windowID: targetWindowID),
@@ -170,24 +169,13 @@ final class MenuBarLayoutManager {
170169
DispatchQueue.main.asyncAfter(deadline: .now() + 0.03) {
171170
self?.relay(up, to: ownerPID) { success in
172171
self?.logger.info("Mouse-up relay window \(itemWindowID, privacy: .public) success=\(success, privacy: .public)")
173-
if let physicalPointerLocation { self?.refreshPointerTracking(at: physicalPointerLocation) }
174-
self?.verifyMove(item, relativeTo: targetWindowID, placement: placement, attempt: attempt, check: 0, restoreCursorLocation: physicalPointerLocation, completion: completion)
172+
self?.verifyMove(item, relativeTo: targetWindowID, placement: placement, attempt: attempt, check: 0, completion: completion)
175173
}
176174
}
177175
}
178176
}
179177

180-
/// A WindowServer-targeted drag necessarily contains off-cursor event
181-
/// coordinates. Replaying a movement at the untouched physical location
182-
/// repairs AppKit hover tracking without warping or relocating the cursor.
183-
private func refreshPointerTracking(at point: CGPoint) {
184-
guard let source = CGEventSource(stateID: .privateState),
185-
let event = CGEvent(mouseEventSource: source, mouseType: .mouseMoved, mouseCursorPosition: point, mouseButton: .left) else { return }
186-
event.setIntegerValueField(.eventSourceUserData, value: Int64.random(in: 1...Int64.max))
187-
event.post(tap: .cgSessionEventTap)
188-
}
189-
190-
private func verifyMove(_ item: MenuBarItem, relativeTo targetWindowID: CGWindowID, placement: Placement, attempt: Int, check: Int, restoreCursorLocation: CGPoint?, completion: @escaping (Bool) -> Void) {
178+
private func verifyMove(_ item: MenuBarItem, relativeTo targetWindowID: CGWindowID, placement: Placement, attempt: Int, check: Int, completion: @escaping (Bool) -> Void) {
191179
guard let itemWindowID = item.windowID else { completion(false); return }
192180
DispatchQueue.main.asyncAfter(deadline: .now() + 0.05) { [weak self] in
193181
guard let self else { completion(false); return }
@@ -202,10 +190,10 @@ final class MenuBarLayoutManager {
202190
self.logger.info("Move verification window \(itemWindowID, privacy: .public) attempt \(attempt, privacy: .public) moved=true")
203191
completion(true)
204192
} else if check < 2 {
205-
self.verifyMove(item, relativeTo: targetWindowID, placement: placement, attempt: attempt, check: check + 1, restoreCursorLocation: restoreCursorLocation, completion: completion)
193+
self.verifyMove(item, relativeTo: targetWindowID, placement: placement, attempt: attempt, check: check + 1, completion: completion)
206194
} else if attempt < 3 {
207195
self.logger.info("Move verification window \(itemWindowID, privacy: .public) attempt \(attempt, privacy: .public) timed out")
208-
self.move(item, relativeTo: targetWindowID, placement: placement, attempt: attempt + 1, restoreCursorLocation: restoreCursorLocation, completion: completion)
196+
self.move(item, relativeTo: targetWindowID, placement: placement, attempt: attempt + 1, completion: completion)
209197
} else {
210198
self.logger.info("Move verification window \(itemWindowID, privacy: .public) failed")
211199
completion(false)

‎RELEASE_NOTES.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# OverflowBar 1.0.9
1+
# OverflowBar 1.0.10
22

3-
OverflowBar 1.0.9 makes menu-bar discovery and activation substantially faster and more resilient.
3+
OverflowBar 1.0.10 fixes a regression where other applications could lose their normal hover cursor shapes while OverflowBar was enabled.
44

5-
This release keeps Control Center-backed items (including Feishu's generic status item) stable across refreshes, automatically detects newly-created items, and uses a WindowServer session event for fallback activation.
5+
OverflowBar no longer publishes synthetic session-wide mouse-movement events after layout changes. Pointer and text-edit cursor states are now left to the active application.
66

77
## Fixed
88

@@ -13,7 +13,7 @@ This release keeps Control Center-backed items (including Feishu's generic statu
1313

1414
## Install
1515

16-
1. Download `OverflowBar-1.0.9.dmg`.
16+
1. Download `OverflowBar-1.0.10.dmg`.
1717
2. Open the disk image and drag OverflowBar to Applications.
1818
3. Replace an older copy when prompted.
1919

0 commit comments

Comments
 (0)