kennylevinsen/wldash

wldash doesn't receive input if opened on secondary monitor

Closed this issue · 9 comments

Mel34 commented

My monitor layout is as defined in sway config file:

    output HDMI-A-2 resolution 2560x1080 position 0,0 
    output DVI-D-1 resolution 1920x1080 position 2560,0 

If I launch wldash using a hotkey defined in sway config file and it opens on my DVI-D-1 screen, it doesn't receive keyboard input. Scrolling the mousewheel before pressing any keys gives the focus to wldash.

Launching it from a terminal opened on that same screen using eval "$(dot-desktop "$(dot-desktop | wldash)")" it receives keyboard input.

I have a feeling this might be related to swaywm/sway#4407

This does not happen if wldash is opened on my primary screen (HDMI-A-2)

It's most likely the linked sway issue. I found a quite a few scenarios where keyboard focus was not correctly assigned in sway.

I'm toying with the idea of displaying the dashboard an all outputs, which might work around the issue as well.

Mel34 commented

IMHO you should, this is what bemenu already does. When I trigger wldash I'm expecting it to receive keystrokes.

I will only implement it if I like the visual of it, though. I won't do it just as a workaround. The lack of keyboard focus is a bug in sway, and should be fixed there (possibly by me, should I find time to look into it).

Mel34 commented

Chances are it's somewhere in swaybar's code. If I pkill swaybar I can't reproduce this.

swaybar is also a layer-shell surface, so it might just be a bug with handling focus for multiple layer-shell surfaces.

Mel34 commented

This swaywm/sway#4467 pull request definitely fixes this issue, I've applied it to my fork of sway and built wldash from e9decaa (prior to Visible on all outputs commit)

Just a heads up: The all outputs feature is now hidden behind WLDASH_ALL_OUTPUTS=1 (environment variable - haven't gotten around to making a configuration solution).

The reason for this is that I did not really like the experience that much, but as the implementation overhead was minimal, I thought I'd leave it up to the user.

Mel34 commented

I've created a pull request to update the readme file to include this and bc calculator feature.

Closing due to fix being merged into sway.