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

Double-clicking a vscode CSD window to drag causes click input behind the window #1212

Open
ryanabx opened this issue Feb 11, 2025 · 10 comments

Comments

@ryanabx
Copy link
Contributor

ryanabx commented Feb 11, 2025

Could possibly be related to how focus works when dragging a window (i.e. the window loses focus). We need to handle this case somehow, because inputs can come through when the vscode window loses focus.

2025-02-11.02-51-08.mp4
@feikedonia
Copy link
Contributor

How could I replicate the issue?

@ryanabx
Copy link
Contributor Author

ryanabx commented Feb 11, 2025

To replicate:

  • Open VSCode (with custom decorations enabled) and have a window behind it
  • Double click the header bar with a touchpad (initiating a window drag, but not holding down on the second click)
  • The window behind it will register a click

@feikedonia
Copy link
Contributor

feikedonia commented Feb 11, 2025

Where did you install VSCode from, and which Distro are you on?

commandline:

cat /etc/os-release | grep PRETTY_NAME

gives you your distro name, mine is:
PRETTY_NAME="Fedora Linux 40 (KDE Plasma)"

But I installed Cosmic onto it.

Then you could use uname to ask for the kernel version

uname --kernel-release

or

uname -r

mine says: 6.12.11-100.fc40.x86_64

Then, to conclude, I like to know how you installed VSCode,
Flatpak? APT (ubuntu/debian/pop_os)? RPM (Fedora)?

With kind regards,
Feike

@ryanabx
Copy link
Contributor Author

ryanabx commented Feb 11, 2025

This can be reproduced regardless of where you get vscode. I've reproduced with the flatpak and within a toolbox

It has only been tested with a touchpad, and that might be essential to reproducing it. If you don't have a laptop, you might see different results.

Kernel version shouldn't matter here, but since you're curious:

uname -a
Linux fedora 6.14.0-0.rc1.15.fc42.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Feb  3 15:19:42 UTC 2025 x86_64 GNU/Linux
rpm -q cosmic-comp
cosmic-comp-1.0.0~alpha.5.1^git20250208.ec1026d-1.fc42.x86_64

@feikedonia
Copy link
Contributor

feikedonia commented Feb 11, 2025

I don't know if I need the kernel number, might as well ask it... I can't as well read your knowledge level, so I assume you need some help, if not that's fine :-) I am kwite new to github and stuff.

cosmic-comp-1.0.0~alpha.5.1^git20250208.ec1026d-1.fc40.x86_64

installing https://flathub.org/apps/com.visualstudio.code

((( ah you were the guy on Brodie's stream! )))

@feikedonia
Copy link
Contributor

When the focus follows cursor is active, pressing the three dots and moving your mouse to the menu doesn't keep the window open....

  1. enable focus follows cursor
  2. enable cursor follows focus
  3. open VScode as an floating window
  4. click on the three dots 'more actions'
  5. hover with your mouse over the menu, just outside of the main window
  6. the menu closes.

expected:
the menu doesn't close when your mouse is on top of it and should only close if the mouse goes of off the menu.

Image

@feikedonia
Copy link
Contributor

feikedonia commented Feb 11, 2025

Image

The other bug is there too...
#1064

@feikedonia
Copy link
Contributor

To replicate:

* Open VSCode (with custom decorations enabled) and have a window behind it

* Double click the header bar with a touchpad (initiating a window drag, but not holding down on the second click)

* The window behind it will register a click

"* Open VSCode (with custom decorations enabled) and have a window behind it"
how? custom decorations enabled?

@ryanabx
Copy link
Contributor Author

ryanabx commented Feb 11, 2025

"* Open VSCode (with custom decorations enabled) and have a window behind it"
how? custom decorations enabled?

Set these settings

Image

Found out you can also reproduce it with chrome with its custom titlebar.

@feikedonia
Copy link
Contributor

I think I can't reproduce it, because my focus follows the cursor, so, I'll disable it and try again.

  • No, that wasn't it.

Double click the header bar with a touchpad (initiating a window drag, but not holding down on the second click)

  • Yes, it works, the first click changes the focus to the firefox window behind it, the second click restores the focus back to the VSCode window
  • It also works with regular mouse, not just the touchpad

Now trying with focus follows the cursor and cursor follows focus back on...

  • also works

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

No branches or pull requests

2 participants