Block window drag to non-desktop-mode displays
This commit blocks window drag to non-desktop-mode displays by:
- Dynamically updating the mouse pointer icon to show drag validity.
- Displays `PointerIcon.TYPE_ARROW` when drag move event is on a
desktop-mode display.
- Switches to `PointerIcon.TYPE_NO_DROP` when drag move event is on a
non-desktop-mode display, indicating an invalid drop target.
- Resets to `PointerIcon.TYPE_ARROW` on drag end.
- Ignoring input events on non-desktop-mode displays in bounds
calculation.
- If during drag move, the cursor is over an non-desktop-mode display,
the window retains its last valid bounds.
- If drag ends on an non-desktop-mode display, we put the window back
to its initial position.
UX discussion see: go/connected-display-window-drag-blocked
Demo: go/connected-display-window-drag-blocked-demo
Bug: b/383069176
Test: manual, with enable_multiple_desktops_default_activation_in_desktop_first_displays
flag enabled to ensure getActiveDeskId returns correctly when no window
is opened on a desktop-mode supported display.
Flag: com.android.window.flags.enable_connected_displays_window_drag
Change-Id: I8c7d921e4073f77b61c1bc8224e8aad4a663777e
Loading
Please register or sign in to comment