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

Cursor not alligned on some windows #35

Open
scaledteam opened this issue Aug 20, 2021 · 4 comments
Open

Cursor not alligned on some windows #35

scaledteam opened this issue Aug 20, 2021 · 4 comments
Labels

Comments

@scaledteam
Copy link
Contributor

Looks like sometimes it aligned with wrong windows.

Chromium - not aligned
Blender - aligned
ClassiCube - aligned
Minecraft 1.16.5 (java 11) - not aligned
Minecraft 1.0 (java 8) - not aligned
Counter Strike 1.6 - aligned
mpv player - aligned

@nowrep
Copy link
Owner

nowrep commented Aug 20, 2021

Are you on X11 or Wayland?

@scaledteam
Copy link
Contributor Author

X11

@nowrep
Copy link
Owner

nowrep commented Aug 20, 2021

So either it picks the wrong window id or the coords translation is not correct.

You can check if the window id is correct by comparing winid from here ctx->tdata.winid

if (!ctx->root_winid && ctx->tdata.winid) {
xcb_query_tree_cookie_t tre_c = xcb_query_tree_unchecked(ctx->xcb, ctx->tdata.winid);
xcb_query_tree_reply_t *tre_r = xcb_query_tree_reply(ctx->xcb, tre_c, NULL);
if (tre_r) {
ctx->root_winid = tre_r->root;
free(tre_r);
}
}
xcb_translate_coordinates_cookie_t tr_c;

and with the window id of the captured window (xwininfo).

@Relacibo
Copy link

I use polymc to start minecraft (1.16.1). The cursor is only captured on the top left monitor.

@nowrep nowrep added the x11 label Sep 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants