Skip to content

Commit

Permalink
Add comment in RunLoopLocalEventMonitor
Browse files Browse the repository at this point in the history
  • Loading branch information
decodism committed Jul 14, 2023
1 parent 58c6aff commit d13696d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Sources/KeyboardShortcuts/Utilities.swift
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ final class RunLoopLocalEventMonitor {
self.callback = callback

self.observer = CFRunLoopObserverCreateWithHandler(nil, CFRunLoopActivity.beforeSources.rawValue, true, 0) { _, _ in
/* Pull all events from the queue and push back in undiscarded events, maintaining order:
non-matching events as is and matching events after handling */

var eventsToHandle = [NSEvent]()

while let eventToHandle = NSApp.nextEvent(matching: .any, until: nil, inMode: .default, dequeue: true) {
Expand Down

0 comments on commit d13696d

Please sign in to comment.