feat: support dip <-> screen conversion on Linux X11 (#46895)

feat: support dip <-> screen conversion on Linux

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
trop[bot] 2025-05-02 19:08:50 -05:00 committed by GitHub
commit d783f134d9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 106 additions and 31 deletions

View file

@ -15,6 +15,7 @@
namespace gfx {
class Point;
class PointF;
class Rect;
class Screen;
} // namespace gfx
@ -58,6 +59,9 @@ class Screen final : public gin::Wrappable<Screen>,
return screen_->GetDisplayMatching(match_rect);
}
gfx::PointF ScreenToDIPPoint(const gfx::PointF& point_px);
gfx::Point DIPToScreenPoint(const gfx::Point& point_dip);
// display::DisplayObserver:
void OnDisplayAdded(const display::Display& new_display) override;
void OnDisplaysRemoved(const display::Displays& removed_displays) override;