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

Move cursor to newly opened window that has focus #9

Open
ghost opened this issue Sep 15, 2022 · 2 comments
Open

Move cursor to newly opened window that has focus #9

ghost opened this issue Sep 15, 2022 · 2 comments

Comments

@ghost
Copy link

ghost commented Sep 15, 2022

Can you make it so the cursor moves to newly opened window that is focused?

If the newly opened window is not focused (and a "XXX is ready" notification should appear) then don't move cursor.

@ghost
Copy link
Author

ghost commented Sep 15, 2022

Existing extensions (Mouse Follow Focus, Centre Focus) reacts to arbitrary focus change signal which causes issues so I can't use them.
Maybe you can listen to window created event?

@ghost
Copy link
Author

ghost commented Sep 15, 2022

ok so it's weird that newly opened window doesn't trigger activateWindow.

But on new window created window-demands-attention should get fired according to this:

https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/ui/windowAttentionHandler.js#L13

Relevant documentation:

https://gjs-docs.gnome.org/meta9~9_api/meta.display#signal-window-demands-attention

Perhaps you can try binding the same way windowAttentionHandler.js does.

I have zero experience writing gnome extension so i could be completely wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

0 participants