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

Not work for some windows under wayland #21

Closed
OmmyZhang opened this issue Jun 23, 2022 · 9 comments
Closed

Not work for some windows under wayland #21

OmmyZhang opened this issue Jun 23, 2022 · 9 comments
Labels

Comments

@OmmyZhang
Copy link

OmmyZhang commented Jun 23, 2022

System information

  • OS Platform and Distribution: linux Arch
  • GNOME version: 42.2
  • Display Server(X11/Wayland): Wayland
  • Exact command to reproduce:

Describe the problem

It works fine when using Xorg(with WaylandEnable=false), but when using Wayland, some windows work, some not.
For example, Chrome works, gnome-terminal not.

Source code / logs

No any debug log when trying to scroll on windows that do not work, and normal logs for those work fine.

@pbxqdown
Copy link
Owner

Thanks for reporting the issue! It seems that some users reported similar issue before.

The main logic of the extension is: press hotkey -> create an overlay -> detect scroll event from this overlay -> change transparency based on scroll event.

Are you able to see the log such as [DEBUG][TransparentWindow] Hot key pressed? If there is such log, we can confirm hotkey detection works fine.

@OmmyZhang
Copy link
Author

For the windows that work, yes there're such logs.

$ journalctl /usr/bin/gnome-shell -f
...
...
Jun 23 14:54:53 D gnome-shell[1121]: [DEBUG][TransparentWindow] Hot key pressed
Jun 23 14:54:53 D gnome-shell[1121]: [DEBUG][TransparentWindow] 8
Jun 23 14:54:53 D gnome-shell[1121]: [DEBUG][TransparentWindow] Modifier key pressed, listening to scroll
Jun 23 14:54:53 D gnome-shell[1121]: [DEBUG][TransparentWindow] overlay created
Jun 23 14:54:53 D gnome-shell[1121]: [DEBUG][TransparentWindow] Hot key pressed
Jun 23 14:54:53 D gnome-shell[1121]: [DEBUG][TransparentWindow] 0
Jun 23 14:54:53 D gnome-shell[1121]: [DEBUG][TransparentWindow] overlay destroyed

But for those not work, just nothing. No any log appears after I press alt.

@pbxqdown
Copy link
Owner

The hotkey logic is defined in a per-display way:

sig_keymap = keymap.connect('state_changed', onHotkeyPressed);

I'm not sure whether it is possible that wayland uses different displays for different windows.

Could you list all window types that don't work? This may give us some hint.
Also please check whether it is possible the hotkey is masked by application's shortcut key.

@OmmyZhang
Copy link
Author

Not work: gnome-terminal, Files, Settings(and all system setting windows, such as Extensions and Tweaks), gedit.

It seems only work on applications that are somehow third part, like Firefox, Chrome, VLC.

As there's no any log when I just press alt, I think this problem may not related to application's shortcut key.

@pbxqdown
Copy link
Owner

for the gnome-terminal window, do you select/focus that window and hotkey doesn't work? how about try this: select a chrome window, press hotkey, then move cursor to hover on gnome-terminal window, then scroll and see if it changes opacity.

@OmmyZhang
Copy link
Author

select a chrome window, press hotkey, then move cursor to hover on gnome-terminal window, then scroll and see if it changes opacity.

Yes, this works. Terminal's opacity is changed. Amazing!

@pbxqdown
Copy link
Owner

Awesome! But still this is strange..guess gnome-terminal somewhat capture the hotkey event such that it can not be received.

@github-actions
Copy link

github-actions bot commented Aug 5, 2023

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Aug 5, 2023
@github-actions
Copy link

This issue was closed because it has been inactive for 15 days since being marked as stale.

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

2 participants