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

glfw - Fix hidden cursor on re-focus and window repaint #32

Merged

Conversation

mneumann
Copy link
Contributor

  • Related bug report: Mouse cursor hides behind window scenic#324

  • On some Window managers (e.g. CTWM) the window is not repainted when another window is moved over it. Add refresh_window_callback and "redraw" (reuse reshape_window for now...).

  • At least on Hikari (Wayland), when the cursor leaves the window and re-enters the window, the cusor was no longer visible. This commit fixes this issue by adding a focus_window_callback and explicitly setting the cursor when focus is regained.

  • NOTE: This might (or might not) show a cursor where no cursor is wanted (touch-screen devices?). To fix this, the glfwSetCusor and glfwSetInputMode calls in focus_window_callback should be conditionalized by a global per-device setting, whether a cursor is desired or not.

@crertel
Copy link
Contributor

crertel commented Jul 17, 2023

Great work! Let's see if we can get somebody to verify the touch-screen behavior, but this is super neat!

@crertel
Copy link
Contributor

crertel commented Aug 24, 2023

@mneumann would you mind updating against current head of main so we can get the CI signoff? Sorry for the delay. :)

@mneumann mneumann force-pushed the fix-mouse-focus-and-window-repaint branch from cda3ccb to 6a734e4 Compare August 29, 2023 05:53
@mneumann
Copy link
Contributor Author

@crertel no worries. there we go: rebased to recent main :)

@mneumann
Copy link
Contributor Author

mneumann commented Sep 8, 2023

@crertel ping :).

@crertel
Copy link
Contributor

crertel commented Dec 16, 2023

Sorry, sorry, @mneumann last rebase and we'll get it merged!

(doing end-of-year cleanup)

* Related bug report: ScenicFramework/scenic#324

* On some Window managers (e.g. CTWM) the window is not repainted when
  another window is moved over it. Add `refresh_window_callback` and
  "redraw" (reuse `reshape_window` for now...).

* At least on Hikari (Wayland), when the cursor leaves the window and
  re-enters the window, the cusor was no longer visible. This commit
  fixes this issue by adding a `focus_window_callback` and explicitly
  setting the cursor when focus is regained.

* NOTE: This might (or might not) show a cursor where no cursor is
  wanted (touch-screen devices?). To fix this, the `glfwSetCusor` and
  `glfwSetInputMode` calls in `focus_window_callback` should be
  conditionalized by a global per-device setting, whether a cursor is
  desired or not.
@mneumann mneumann force-pushed the fix-mouse-focus-and-window-repaint branch from 6a734e4 to a948bdd Compare December 17, 2023 13:03
@mneumann
Copy link
Contributor Author

@crertel no worries! there we go - rebase done :)

@crertel crertel merged commit bdc01a4 into ScenicFramework:main Dec 17, 2023
1 check passed
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 this pull request may close these issues.

2 participants