Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(447)

Unified Diff: ui/ozone/platform/dri/dri_cursor.h

Issue 873563002: [Ozone] Constrain the cursor when overscan insets are set (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/ozone/platform/caca/caca_window.cc ('k') | ui/ozone/platform/dri/dri_cursor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/dri/dri_cursor.h
diff --git a/ui/ozone/platform/dri/dri_cursor.h b/ui/ozone/platform/dri/dri_cursor.h
index f66f400fdc8d9cef2c8db34b8365e15d84db50c1..d0121662c5a777f019f260d2a61a8306f6cdc0bd 100644
--- a/ui/ozone/platform/dri/dri_cursor.h
+++ b/ui/ozone/platform/dri/dri_cursor.h
@@ -41,13 +41,17 @@ class DriCursor : public CursorDelegateEvdev, public GpuPlatformSupportHost {
void SetCursor(gfx::AcceleratedWidget window, PlatformCursor platform_cursor);
// Handle window lifecycle.
- void OnWindowAdded(gfx::AcceleratedWidget window, const gfx::Rect& bounds);
+ void OnWindowAdded(gfx::AcceleratedWidget window,
+ const gfx::Rect& bounds_in_screen,
+ const gfx::Rect& cursor_confined_bounds);
void OnWindowRemoved(gfx::AcceleratedWidget window);
// Handle window bounds changes.
void PrepareForBoundsChange(gfx::AcceleratedWidget window);
- void CommitBoundsChange(gfx::AcceleratedWidget window,
- const gfx::Rect& bounds);
+
+ // Confines the cursor to |confined_bounds| for |window|.
+ void ConfineCursorToBounds(gfx::AcceleratedWidget window,
+ const gfx::Rect& bounds);
// CursorDelegateEvdev:
void MoveCursorTo(gfx::AcceleratedWidget window,
@@ -56,7 +60,7 @@ class DriCursor : public CursorDelegateEvdev, public GpuPlatformSupportHost {
void MoveCursor(const gfx::Vector2dF& delta) override;
bool IsCursorVisible() override;
gfx::PointF GetLocation() override;
- gfx::Rect GetCursorDisplayBounds() override;
+ gfx::Rect GetCursorConfinedBounds() override;
// GpuPlatformSupportHost:
void OnChannelEstablished(
@@ -102,7 +106,10 @@ class DriCursor : public CursorDelegateEvdev, public GpuPlatformSupportHost {
gfx::PointF location;
// The bounds of the display under the cursor.
- gfx::Rect bounds;
+ gfx::Rect display_bounds_in_screen;
+
+ // The bounds that the cursor is confined to in |window|.
+ gfx::Rect confined_bounds;
int host_id;
« no previous file with comments | « ui/ozone/platform/caca/caca_window.cc ('k') | ui/ozone/platform/dri/dri_cursor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698