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

linux/x11: Cursor style doesn't update when application not focused #13897

Open
1 task done
someone13574 opened this issue Jul 6, 2024 · 1 comment · Fixed by #13943
Open
1 task done

linux/x11: Cursor style doesn't update when application not focused #13897

someone13574 opened this issue Jul 6, 2024 · 1 comment · Fixed by #13943
Labels
defect [core label] linux linux-x11 Linux X11 mouse interaction Feedback for mouse interaction states, actions, etc

Comments

@someone13574
Copy link
Contributor

someone13574 commented Jul 6, 2024

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

  1. Have Zed and another application open beside each other.
  2. Click on Zed to focus it.
  3. Hover over the border of Zed, so that the icon changes to the resize icon.
  4. Click on the other app to focus it.
  5. Hover over Zed without focusing it.
  6. The icon will still be the resize icon and not update until you focus Zed.

OR:

  1. Have Zed and another application open beside each other.
  2. Click on Zed to focus to.
  3. Hover over an element with a unique icon.
  4. Alt-tab to the other application.
  5. Now the cursor will not update (while hovering over Zed) until you re-focus Zed.

@mrnugget I haven't bisected it, but it smells a lot like something from #13646.

Environment

Gnome native X11. Kernel: 6.6.37

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

No response

@someone13574 someone13574 added admin read Pending admin review defect [core label] triage Maintainer needs to classify the issue labels Jul 6, 2024
@mrnugget
Copy link
Member

mrnugget commented Jul 8, 2024

Thanks! I just tried this and can reproduce this, but only with client-side window decorations. If I use ZED_WINDOW_DECORATIONS=server this is not an issue. Without having looked at the code, it seems like we set the cursor to the resize cursor once it's in the hitbox and then we don't set it back when we lose focus.

@JosephTLyons JosephTLyons added mouse interaction Feedback for mouse interaction states, actions, etc linux and removed triage Maintainer needs to classify the issue admin read Pending admin review labels Jul 8, 2024
ConradIrwin pushed a commit that referenced this issue Jul 9, 2024
mrnugget added a commit that referenced this issue Jul 9, 2024
This reverts #13943 and reopens #13897 since the fix in #13943 comes
with a regression:

Sometimes Zed loses keyboard focus and can't be restored. I haven't
figured out yet exactly when and how this happens and can't reliably
reproduce it yet, but there's something off with focus handling.

One reliable way to reproduce _one_ of the problems:

1. Open two zed windows
2. Focus one Zed window
3. Hover with the mouse over the other
4. Try to type in the window that should still be focused

So, to be careful, I'm going to revert the PR first, since I couldn't
find an obvious fix yet. If we do find a fix, we can unrevert.
mrnugget added a commit that referenced this issue Jul 9, 2024
…13974)

This reverts #13943 and reopens #13897 since the fix in #13943 comes
with a regression:

Sometimes Zed loses keyboard focus and can't be restored. I haven't
figured out yet exactly when and how this happens and can't reliably
reproduce it yet, but there's something off with focus handling.

One reliable way to reproduce _one_ of the problems:

1. Open two zed windows
2. Focus one Zed window
3. Hover with the mouse over the other
4. Try to type in the window that should still be focused

So, to be careful, I'm going to revert the PR first, since I couldn't
find an obvious fix yet. If we do find a fix, we can unrevert.


Release Notes:

- N/A
@mrnugget mrnugget reopened this Jul 9, 2024
mrnugget added a commit that referenced this issue Jul 9, 2024
…13974)

This reverts #13943 and reopens #13897 since the fix in #13943 comes
with a regression:

Sometimes Zed loses keyboard focus and can't be restored. I haven't
figured out yet exactly when and how this happens and can't reliably
reproduce it yet, but there's something off with focus handling.

One reliable way to reproduce _one_ of the problems:

1. Open two zed windows
2. Focus one Zed window
3. Hover with the mouse over the other
4. Try to type in the window that should still be focused

So, to be careful, I'm going to revert the PR first, since I couldn't
find an obvious fix yet. If we do find a fix, we can unrevert.


Release Notes:

- N/A
@notpeter notpeter added the linux-x11 Linux X11 label Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect [core label] linux linux-x11 Linux X11 mouse interaction Feedback for mouse interaction states, actions, etc
Projects
None yet
4 participants