Skip to content

Commit

Permalink
Ensure that the left of the input window is always visible
Browse files Browse the repository at this point in the history
The priority of the candidate words in the left of the input window is higher than
those in the right. So it's more intuitive to ensure that the left of the input window
is always visible.
  • Loading branch information
kingysu authored and wengxt committed Jun 11, 2024
1 parent 1f27878 commit 9502408
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ui/classic/xcbinputwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ int XCBInputWindow::calculatePositionX(const Rect &cursorRect,
if (newX + actualWidth > closestScreen->right()) {
newX = closestScreen->right() - actualWidth;
}

x = std::max(newX, closestScreen->left());
}

// exclude shadow border width
Expand Down

0 comments on commit 9502408

Please sign in to comment.