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

[BUG] focusable windows on wayland have exclusive focus #651

Open
3 tasks done
dangerousdan opened this issue Dec 22, 2022 · 9 comments · May be fixed by #1215
Open
3 tasks done

[BUG] focusable windows on wayland have exclusive focus #651

dangerousdan opened this issue Dec 22, 2022 · 9 comments · May be fixed by #1215
Labels
bug Something isn't working

Comments

@dangerousdan
Copy link

Checklist before submitting an issue

  • I have searched through the existing closed and open issues for eww and made sure this is not a duplicate
  • I have specifically verified that this bug is not a common user error
  • I am providing as much relevant information as I am able to in this bug report (Minimal config to reproduce the issue for example, if applicable)

Description of the bug

On wayland, windows with :focusable true cause the window to have exclusive keyboard focus. This renders any :focusable window unusable.

This seems to be caused by GTK keyboard mode not being set properly.

Reproducing the issue

eww 0.4.0 678e4db

(defwindow example
    :focusable true
    (label :text "I cant type in any windows behind this")
)

Expected behaviour

Use GTK_LAYER_SHELL_KEYBOARD_MODE_ON_DEMAND by default.

Additional context

No response

@dangerousdan dangerousdan added the bug Something isn't working label Dec 22, 2022
@mewoocat
Copy link

I'm having this same issue. Did you find a workaround?

@N0tAI
Copy link

N0tAI commented Jul 23, 2023

I came across this last night and found that if you specify that setting the stacking property to bg fixed this to only initially grab focus but allowed you to then focus on other apps (in my case this was also stealing all mouse input on the monitor).

eg

(defwindow example
    :focusable true
    :stacking "bg"
    (label :text "You should be able to type to other windows once you focus on them.")
)

@killmlana
Copy link

I came across this last night and found that if you specify that setting the stacking property to bg fixed this to only initially grab focus but allowed you to then focus on other apps (in my case this was also stealing all mouse input on the monitor).

eg

(defwindow example
    :focusable true
    :stacking "bg"
    (label :text "You should be able to type to other windows once you focus on them.")
)

It works but the eww window doesn't overlay the other windows even when it has gained focus

@GaspardCulis
Copy link

Having the same issue, when setting :focusable to true the widget gets exclusive focus and I can't type in other windows.

Noticed the function gtk_layer_shell::set_keyboard_interactivity called in src/display_backend.rs:66 is deprecated since gtk_layer_shell v0.6, which might be causing the issue ?

@Dr-42
Copy link

Dr-42 commented Jun 26, 2024

I am having the same issue. I am trying to create a notification daemon with support for inline replies and hence can't use the "bg" hack since notifs need to be displayed on top of everything. So, Currently, in my testing, I can either not type anything, or I have to forsake my keyboard for the duration of the display of the notification.

@djmaze
Copy link

djmaze commented Sep 8, 2024

Anyone have a solution to this problem? With this behaviour, it seems eww is not a viable waybar alternative on Wayland.

@djmaze
Copy link

djmaze commented Sep 9, 2024

Turns out this problem does not occur on the latest master version for me anymore. (I had installed 0.6.0 previously.)

@GaspardCulis
Copy link

GaspardCulis commented Sep 9, 2024

I still have the same issue even after updating to 8661abf

@GallowsDove GallowsDove linked a pull request Oct 18, 2024 that will close this issue
3 tasks
@GallowsDove
Copy link

If anyone needs this, feel free to use my fork (in the opened PR), as it doesn't seem that anything is getting merged at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants