﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
24659	"[macOS 15 Sequoia] plbuildings plugin: ""Cursor is outside the map area"" error on ARM64"	olo81	stoecker	"Environment:

OS: macOS 15.x (Sequoia / Tahoe)

Architecture: Apple Silicon (ARM64)

JOSM Version: 190xx (installed via Homebrew: JOSM_24_arm64.app)

Java Version: OpenJDK 21/23 (ARM64)

Plugin: plbuildings (https://josm.openstreetmap.de/wiki/Plugins/PLBuildings)

The Issue:
After updating to macOS 15 (Sequoia), the plbuildings plugin has stopped functioning correctly. When attempting to click on the map to import buildings, the plugin throws an error message: ""Cursor is outside the map area"" (Polish: ""Kursor jest poza obszarem mapy"").

This happens even when the cursor is clearly within the active data layer and at a high zoom level.

Technical Context & Suspected Cause:
The issue seems to be related to a coordinate mapping regression in Java on macOS Sequoia, specifically regarding HiDPI (Retina) screens and the new Window Tiling features. There is a known issue in OpenJDK where mouse event coordinates are reported incorrectly if the window is scaled or moved within the new macOS windowing system.

Related OpenJDK / External issues:

JDK-8333241 / PR #21153: [macos] Mouse events coordinates are wrong on macOS Sequoia.

JDK-8158776: Incorrect coordinate transformation on HiDPI screens in certain macOS versions.

It appears that plbuildings uses getMousePosition() or similar AWT methods that, under macOS 15, return logical points that are not correctly translated to the physical pixel grid used by the JOSM map canvas, resulting in a ""Factor 2x"" offset or a global coordinate shift.

Steps to Reproduce:

Open JOSM (ARM64 version) on macOS Sequoia.

Download any OSM data in Poland.

Activate the plbuildings plugin.

Zoom in to a building level.

Click on the map to fetch a building.

Result: Error ""Cursor is outside the map area"" appears.

Workarounds attempted (none resolved the issue):

Toggling mappaint.use-niddpi in advanced preferences.

Adjusting gui.scale.

Disabling macOS Window Tiling.

Running with -Dsun.java2d.uiScale=1.0.

Reinstalling JOSM and the plugin.

Requested Action:
Could the developers check if the plugin's coordinate retrieval method needs to be updated for better compatibility with macOS 15's coordinate space, or if there is a JOSM-wide fix for mouse event mapping on Sequoia?"	defect	closed	normal		Plugin plbuildings		fixed	macos, sequoia, arm64, plbuildings, retina	
