Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions shell/platform/windows/keyboard_manager_win32.cc
Original file line number Diff line number Diff line change
Expand Up @@ -441,12 +441,4 @@ UINT KeyboardManagerWin32::PeekNextMessageType(UINT wMsgFilterMin,
return next_message.message;
}

uint64_t KeyboardManagerWin32::ComputeEventHash(const PendingEvent& event) {
// Calculate a key event ID based on the scan code of the key pressed,
// and the flags we care about.
return event.scancode | (((event.action == WM_KEYUP ? KEYEVENTF_KEYUP : 0x0) |
(event.extended ? KEYEVENTF_EXTENDEDKEY : 0x0))
<< 16);
}

} // namespace flutter
17 changes: 0 additions & 17 deletions shell/platform/windows/keyboard_manager_win32.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,23 +204,6 @@ class KeyboardManagerWin32 {
// The queue of messages that have been redispatched to the system but have
// not yet been received for a second time.
std::deque<Win32Message> pending_redispatches_;

// Calculate a hash based on event data for fast comparison for a redispatched
// event.
//
// This uses event data instead of generating a serial number because
// information can't be attached to the redispatched events, so it has to be
// possible to compute an ID from the identifying data in the event when it is
// received again in order to differentiate between events that are new, and
// events that have been redispatched.
//
// Another alternative would be to compute a checksum from all the data in the
// event (just compute it over the bytes in the struct, probably skipping
// timestamps), but the fields used are enough to differentiate them, and
// since Windows does some processing on the events (coming up with virtual
// key codes, setting timestamps, etc.), it's not clear that the redispatched
// events would have the same checksums.
static uint64_t ComputeEventHash(const PendingEvent& event);
};

} // namespace flutter
Expand Down
Loading