Skip to content

Commit

Permalink
Both scrollbars need to be able to process the same key event.
Browse files Browse the repository at this point in the history
  • Loading branch information
gijsbers committed Nov 11, 2024
1 parent cab3af4 commit af29b75
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/yscrollview.cc
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,9 @@ void YScrollView::configure(const YRect2& r) {
}

bool YScrollView::handleScrollKeys(const XKeyEvent& key) {
return scrollVert->handleScrollKeys(key)
|| scrollHoriz->handleScrollKeys(key);
const int v = scrollVert->handleScrollKeys(key);
const int h = scrollHoriz->handleScrollKeys(key);
return bool(v | h);
}

void YScrollView::handleExpose(const XExposeEvent& expose) {
Expand Down

0 comments on commit af29b75

Please sign in to comment.