Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: screen.getCursorScreenPoint() not works on linux (a regression from v28.x.x) #42519

Open
3 tasks done
gigony opened this issue Jun 17, 2024 · 0 comments
Open
3 tasks done
Assignees
Labels
31-x-y bug 🪲 component/screen has-repro-gist Issue can be reproduced with code at https://gist.github.com/

Comments

@gigony
Copy link

gigony commented Jun 17, 2024

Preflight Checklist

Electron Version

31.0.1

What operating system are you using?

Ubuntu

Operating System Version

Ubuntu 22.04

What arch are you using?

x64

Last Known Working Electron version

28.3.3

Expected Behavior

screen.getCursorScreenPoint() should return the correct position of the mouse even when the mouse cursor is out of the main window or the mouse event is pass-through.

mainWindow.setIgnoreMouseEvents(true, { forward: true });

Actual Behavior

screen.getCursorScreenPoint() doesn't return the correct position when the mouse is out of the main window.

I can see that this method is working on MacOS (with v31.0.1)

Testcase Gist URL

https://gist.github.com/gigony/05a05fd87d62a0fd47d99c47aaf5a050

Additional Information

I think this is the same issue with #41496.

This was working until the last version of v28, which is v28.3.3. However, since the first version of v29 (29.0.0), it hasn't behaved the same as v28.x.x.

v28.3.3
image

v31.x.x+
image

If I set pass-through with setIgnoreMouseEvents, mouse position capturing doesn't work regardless of transparent window or not.
v31.x.x+ (with setIgnoreMouseEvents)

mainWindow.setIgnoreMouseEvents(true, { forward: true });

image

Note that I am using X11 window system on Ubuntu 22.04.

That behavior change prevents from using the workaround method for 'Support click-through of transparency #1335' (#1335)

@electron-issue-triage electron-issue-triage bot added 31-x-y has-repro-gist Issue can be reproduced with code at https://gist.github.com/ labels Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
31-x-y bug 🪲 component/screen has-repro-gist Issue can be reproduced with code at https://gist.github.com/
Projects
Status: 👍 Does Not Block Stable
Development

No branches or pull requests

3 participants