Skip to content

Commit

Permalink
WindowServer: Position popup menu with offset of 1 pixel
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewbjones authored and awesomekling committed Jun 3, 2021
1 parent a4f320c commit b0682a7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Userland/Services/WindowServer/Menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,8 @@ void Menu::do_popup(const Gfx::IntPoint& position, bool make_input, bool as_subm

if (adjusted_pos.x() + window.width() >= Screen::the().width() - margin) {
adjusted_pos = adjusted_pos.translated(-window.width(), 0);
} else {
adjusted_pos.set_x(adjusted_pos.x() + 1);
}
if (adjusted_pos.y() + window.height() >= Screen::the().height() - margin) {
adjusted_pos = adjusted_pos.translated(0, -min(window.height(), adjusted_pos.y()));
Expand Down

0 comments on commit b0682a7

Please sign in to comment.