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

feat: support dip <-> screen conversion on Linux
This commit is contained in:
Shelley Vohr 2025-05-02 10:31:45 +02:00 committed by GitHub
parent 2b07e6450c
commit ede84fc327
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;