mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 21:48:13 +00:00
WindowServer: Place drag and drop overlay at the cursor position
... instead of in the center of the cursor bitmap. It doesn't make much of a difference, as the default cursor hotspot is center. But since now we switch between a normal Drag cursor and DragCopy one that has set hotspot, this caused the overlay to shake.
This commit is contained in:
parent
d4aff36875
commit
f1aa03b779
1 changed files with 1 additions and 1 deletions
|
@ -292,7 +292,7 @@ void DndOverlay::update_rect()
|
|||
auto& font = this->font();
|
||||
int width = font.width(m_text) + bitmap_width;
|
||||
int height = max((int)font.glyph_height(), bitmap_height);
|
||||
auto location = Compositor::the().current_cursor_rect().center().translated(8, 8);
|
||||
auto location = ScreenInput::the().cursor_location().translated(8, 8);
|
||||
set_rect(Gfx::IntRect(location, { width, height }).inflated(16, 8));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue