Loading include/input/DisplayTopologyGraph.h +2 −1 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ enum class DisplayTopologyPosition : int32_t { struct DisplayTopologyAdjacentDisplay { ui::LogicalDisplayId displayId = ui::LogicalDisplayId::INVALID; DisplayTopologyPosition position; float offsetPx; float offsetDp; }; /** Loading @@ -52,6 +52,7 @@ struct DisplayTopologyAdjacentDisplay { struct DisplayTopologyGraph { ui::LogicalDisplayId primaryDisplayId = ui::LogicalDisplayId::INVALID; std::unordered_map<ui::LogicalDisplayId, std::vector<DisplayTopologyAdjacentDisplay>> graph; std::unordered_map<ui::LogicalDisplayId, int> displaysDensity; }; } // namespace android services/inputflinger/PointerChoreographer.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -1017,9 +1017,9 @@ PointerChoreographer::findDestinationDisplayLocked(const ui::LogicalDisplayId so sourceBoundary == DisplayTopologyPosition::BOTTOM ? (destinationViewport->logicalRight - destinationViewport->logicalLeft) : (destinationViewport->logicalBottom - destinationViewport->logicalTop); if (cursorOffset >= adjacentDisplay.offsetPx && cursorOffset <= adjacentDisplay.offsetPx + edgeSize) { return std::make_pair(destinationViewport, adjacentDisplay.offsetPx); if (cursorOffset >= adjacentDisplay.offsetDp && cursorOffset <= adjacentDisplay.offsetDp + edgeSize) { return std::make_pair(destinationViewport, adjacentDisplay.offsetDp); } } return std::nullopt; Loading Loading
include/input/DisplayTopologyGraph.h +2 −1 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ enum class DisplayTopologyPosition : int32_t { struct DisplayTopologyAdjacentDisplay { ui::LogicalDisplayId displayId = ui::LogicalDisplayId::INVALID; DisplayTopologyPosition position; float offsetPx; float offsetDp; }; /** Loading @@ -52,6 +52,7 @@ struct DisplayTopologyAdjacentDisplay { struct DisplayTopologyGraph { ui::LogicalDisplayId primaryDisplayId = ui::LogicalDisplayId::INVALID; std::unordered_map<ui::LogicalDisplayId, std::vector<DisplayTopologyAdjacentDisplay>> graph; std::unordered_map<ui::LogicalDisplayId, int> displaysDensity; }; } // namespace android
services/inputflinger/PointerChoreographer.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -1017,9 +1017,9 @@ PointerChoreographer::findDestinationDisplayLocked(const ui::LogicalDisplayId so sourceBoundary == DisplayTopologyPosition::BOTTOM ? (destinationViewport->logicalRight - destinationViewport->logicalLeft) : (destinationViewport->logicalBottom - destinationViewport->logicalTop); if (cursorOffset >= adjacentDisplay.offsetPx && cursorOffset <= adjacentDisplay.offsetPx + edgeSize) { return std::make_pair(destinationViewport, adjacentDisplay.offsetPx); if (cursorOffset >= adjacentDisplay.offsetDp && cursorOffset <= adjacentDisplay.offsetDp + edgeSize) { return std::make_pair(destinationViewport, adjacentDisplay.offsetDp); } } return std::nullopt; Loading