godotengine / godotengine/godot

Mouse input in the editor is not registered when the editor is on a sway workspace that has a negative offset

Open
#90,671 0 comments 0 reactions 0 assignees View on GitHub
bug platform:linuxbsd topic:input topic:platforms
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

Reproducible in Godot_v4.2.1-stable_linux.x86_64
with
Debian sway/unstable,now 1.9-1+b1 amd64

### System information

Godot v4.2.1.stable - Debian GNU/Linux trixie/sid trixie - Wayland - GLES3 (Compatibility) - AMD Radeon Graphics (radeonsi, renoir, LLVM 17.0.6, DRM 3.57, 6.7.9-amd64) () - AMD Ryzen 7 PRO 4750U with Radeon Graphics (16 Threads)

### Issue description

The editor doesn't react to mouse input (no highlighting and clicks are not registered) when coordinates are negative

When the outputs are configured as:
output DP-2 pos 0 0 res 3840x2160
output eDP-1 pos -1920 1080 res 1920x1080
output HDMI-A-1 pos -1920 0 res 1920x1080

Mouse clicks and hover highlighting doesn't work on eDP-1 and HDMI-A-1

If they are configured as:
output DP-2 pos 1920 0 res 3840x2160
output eDP-1 pos 0 1080 res 1920x1080
output HDMI-A-1 pos 0 0 res 1920x1080
The mouse works as expected

Also if an output is placed to have negative coordinate roughly halfways accross the outpur, the mouse works as expected on the "positive" part of the monitor/output.

I would assume that the mouse coordinates are being treated as unsigned somewhere

### Steps to reproduce

Start godot and move the workspace to and output that has negative screen coordinates

### Minimal reproduction project (MRP)

N/A, bug is in the editor

Contributor guide

Open the contributing guide

Research direction

Reproduce the Godot editor issue on Debian with sway using the negative and positive output-coordinate configurations described in the report. Start by tracing the editor's Wayland mouse-event coordinate handling; done means hover and clicks work across the full output, including negative screen coordinates, with a regression test covering the configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, linux
Domain
desktop, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.