Skip to content

Commit

Permalink
Fix Windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
tonsky committed Dec 23, 2021
1 parent cf0aea3 commit e81cba7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions windows/cc/WindowWin32.cc
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ LRESULT jwm::WindowWin32::processEvent(UINT uMsg, WPARAM wParam, LPARAM lParam)
// assume page scroll
// https://github.com/mozilla/gecko-dev/blob/da97cbad6c9f00fc596253feb5964a8adbb45d9e/widget/windows/WinMouseScrollHandler.cpp#L891-L903
if (linesPerTick > WHEEL_DELTA) {
float sign = ticks > 0 ? 1 : ticks < 0 ? -1 : 0;
float sign = ticks > 0.0f ? 1.0f : ticks < 0.0f ? -1.0f : 0.0f;
JNILocal<jobject> eventMouseScroll(env, classes::EventMouseScroll::make(env, 0.0f, getContentRect().getHeight() * sign, 0.0f, 0.0f, sign, modifiers));
dispatch(eventMouseScroll.get());
} else {
Expand Down Expand Up @@ -880,9 +880,9 @@ void jwm::WindowWin32::_imeGetCompositionStringConvertedRange(HIMC hImc, int &se
bool jwm::WindowWin32::_imeGetRectForMarkedRange(IRect &rect) const {
// Query current cursor position
// If composition starts, Pos will be always 0
auto sectionStart = static_cast<int>(_compositionPos);
auto sectionEnd = sectionStart + 0;
return this->getRectForMarkedRange(selectionStart, selectionEnd, rect);
auto selectionStart = static_cast<int>(_compositionPos);
auto selectionEnd = selectionStart + 0;
return getRectForMarkedRange(selectionStart, selectionEnd, rect);
}

std::wstring jwm::WindowWin32::_imeGetCompositionString(HIMC hImc, DWORD compType) const {
Expand Down

0 comments on commit e81cba7

Please sign in to comment.