Hyprland icon indicating copy to clipboard operation
Hyprland copied to clipboard

No focus for X11 window if mouse is not over it, despite forceinput

Open raffaem opened this issue 1 year ago • 4 comments

I'm on the git version of hyprland:

❯ pacman -Qm | grep hyprland
hyprland-git r2046.0634abf-1
waybar-hyprland 0.9.15-1

I installed the release version of albert:

pacman -S albert

I want to launch it through the X protocol as it doesn't work well with Wayland, see here.

I've put this in my config file:

windowrule = center,^(albert)$
windowrule = forceinput,^(albert)$
exec-once = QT_QPA_PLATFORM=xcb albert

After albert is launched:

albert &; disown

And shown:

albert show

The floating window does not receive focus if the mouse is not over it, despite the forceinput.

raffaem avatar Nov 14 '22 21:11 raffaem

I can still obtain focus through the movefocus dispatcher, but it seems it is because it moves the mouse

raffaem avatar Nov 14 '22 21:11 raffaem

any other app besides albert? It requires a fuckton of deps.

vaxerski avatar Nov 17 '22 13:11 vaxerski

sorry I don't think I have any other XWayland apps installed.

I also don't use albert anymore.

raffaem avatar Nov 17 '22 23:11 raffaem

Since i discovered the issue while implementing noinitialfocus, here is a short description where to look if someone also have such a problem: The app has probably met one of these rules which is why m_bNoInitialFocus = true; was set and therefore the window don't get the initalFocus. By setting forceinput you have ensure to get the initialFocus because in this line if statement we override the m_bNoInitialFocus to false.

niki-on-github avatar Nov 24 '22 18:11 niki-on-github

any other app besides albert? It requires a fuckton of deps.

Can confirm on ulauncher and catapult on GDK_BACKEND=x11

EpsilonKu avatar Apr 10 '23 18:04 EpsilonKu

I can still obtain focus through the movefocus dispatcher, but it seems it is because it moves the mouse

So how do you use the movefocus? In a key binding or in a window rule?

LorenzoBettini avatar May 13 '23 13:05 LorenzoBettini