Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 417094ee authored by Jorge Gil's avatar Jorge Gil
Browse files

[1/N] (Max Menu) Better encapsulation of window decor's views

Moves gesture & click detection for the Maximize Menu out of the
DesktopModeWindowDecorViewModel and into the MaximizeMenuView.

The goal here is to keep the implementation details of the menu view
encapsulated (resource ids, gesture detection, styling - even the fact
that the menu UI happens to be built with xml/android.view and not
Compose), and provide the decoration/viewmodel with abstractions for
actions taken by the user on the view (e.g.
DesktopModeWindowDecoration#setOnLeftSnapClickLitener). The ViewModel
shouldn't care about which specific maximize gesture was triggered
(button in header vs menu vs double-tap), so ideally those others should
be hooked up to these same abstractions later on.

Flag: EXEMPT refactor
Bug: 346441962
Test: atest WMShellUnitTests; maximize menu's hover / click actions work
as usual

Change-Id: I4b5476e157e43f98fc935bc1216e879b354c7e07
parent f0237201
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment