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

Commit 00a6d5e1 authored by Pierre Barbier de Reuille's avatar Pierre Barbier de Reuille
Browse files

Always goes through InputFlags for Desktop Experience input flags

There was one call left that didn't do that.

Also correct the reading of the developer option flag.

Fix: 414596081
Flag: EXEMPT (flag infrastructure)
Test: Manual
Change-Id: If9d9d5be08fbecd4184df513951991cfd028cc12
parent 26597a52
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -30,7 +30,7 @@ namespace {
// Returns the cached dev option value if available.
// Returns the cached dev option value if available.
// This check is only required for connected-displays related features.
// This check is only required for connected-displays related features.
std::optional<bool> getConnectedDisplaysDevOptionValue() {
std::optional<bool> getConnectedDisplaysDevOptionValue() {
    if (!com::android::window::flags::enable_desktop_mode_through_dev_option()) {
    if (!com::android::window::flags::show_desktop_experience_dev_option()) {
        return std::nullopt;
        return std::nullopt;
    }
    }
    static std::optional<bool> cachedDevOption;
    static std::optional<bool> cachedDevOption;
+1 −1
Original line number Original line Diff line number Diff line
@@ -5223,7 +5223,7 @@ ui::Transform InputDispatcher::DispatcherWindowInfo::getRawTransform(
        std::optional<ui::LogicalDisplayId> pointerDisplayId) const {
        std::optional<ui::LogicalDisplayId> pointerDisplayId) const {
    // TODO(b/383092013): Handle TOPOLOGY_AWARE window flag.
    // TODO(b/383092013): Handle TOPOLOGY_AWARE window flag.
    // For now, we assume all windows are topology-aware and can handle cross-display streams.
    // For now, we assume all windows are topology-aware and can handle cross-display streams.
    if (com::android::input::flags::connected_displays_cursor() && pointerDisplayId.has_value() &&
    if (InputFlags::connectedDisplaysCursorEnabled() && pointerDisplayId.has_value() &&
        *pointerDisplayId != windowInfo.displayId) {
        *pointerDisplayId != windowInfo.displayId) {
        // Sending pointer to a different display than the window. This is a
        // Sending pointer to a different display than the window. This is a
        // cross-display drag gesture, so always use the new display's transform.
        // cross-display drag gesture, so always use the new display's transform.