Hyprland icon indicating copy to clipboard operation
Hyprland copied to clipboard

No keyboard focus on newly launched terminal emulator, etc. with Fcitx

Open glyh opened this issue 1 year ago • 11 comments

Hyprland Version

System/Version info
Hyprland, built from branch  at commit fe7b748eb668136dd0558b7c8279bfcd7ab4d759  (props: bump version to 0.39.1).
Date: Tue Apr 16 16:01:03 2024
Tag: v0.39.1, commits: 4460

flags: (if any)


System Information:
System name: Linux
Node name: mechrevo
Release: 6.8.7-arch1-1
Version: #1 SMP PREEMPT_DYNAMIC Wed, 17 Apr 2024 15:20:28 +0000


GPU information: 
00:02.0 VGA compatible controller [0300]: Intel Corporation Alder Lake-P GT1 [UHD Graphics] [8086:46a3] (rev 0c) (prog-if 00 [VGA controller])
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation AD107M [GeForce RTX 4060 Max-Q / Mobile] [10de:28a0] (rev a1) (prog-if 00 [VGA controller])


os-release: NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://gitlab.archlinux.org/groups/archlinux/-/issues"
PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/"
LOGO=archlinux-logo


plugins:


Bug or Regression?

Regression

Description

When creating a new terminal emulator in an empty workspace, I can't type into it(even if it's focused). But after switching to another workspace and switch back to it, I can.

How to reproduce

As above.

Crash reports, logs, images, videos

https://pastebin.ubuntu.com/p/Jf7j772Jc3/

glyh avatar Apr 27 '24 02:04 glyh

doesn't happen on my end. Config?

vaxerski avatar Apr 27 '24 02:04 vaxerski

Here's the config: https://pastebin.ubuntu.com/p/G6GjYRyrtN/

I think it's farily old and I haven't touched it for a while. I guess probably there's some incompatible updates?

Also this should be an regression rather than a bug, I accidentally marked it as a bug.

glyh avatar Apr 27 '24 02:04 glyh

if it's a regression can you git bisect it?

vaxerski avatar Apr 27 '24 02:04 vaxerski

Is the issue I'm encountering (#5764) the same as yours? I don't use tofi, but I observe similar behavior with Kitty and Foot. This can happen very often (50/50), but sometimes, everything is fine.

hftsai256 avatar Apr 27 '24 03:04 hftsai256

@hftsai256 I think it's probably the same, except I can reproduce 100% of the time.

I also realize that on electron apps I have to focus twice to allow keyboard input.

glyh avatar Apr 27 '24 06:04 glyh

@vaxerski I didn't build hyprland on my end, but rather I use a prebuilt binary. I would take a look if I have time.

glyh avatar Apr 27 '24 06:04 glyh

Looks like this is exactly https://github.com/fcitx/fcitx5/issues/1031 and a duplicate of #5764.

glyh avatar Apr 27 '24 06:04 glyh

I've met similar problem, but mine is:

When keep pressing Super key, the focus switching will fail. Its window border indicates that it is focused, but the keyboard actually still focus on the previous one.

E.g. Press Super+Up , keep pressing Super but release Up, and then press Down so that is a Super+Down. This results in a focus failure.

However, press Super+Up , release both Super and Up, and then press Super+Down, it works normally.

This is 100% reproducible on my PC.

btw I'm using AUR package hyprland-git. Distro is Arch Linux.


Update

After pkill fcitx5 it works normal again. ~~So it seems to be a fcitx5 issue then.~~ Fcitx5 dev says it's not a fcitx5 bug: https://github.com/fcitx/fcitx5/issues/1031#issuecomment-2080231237

clsty avatar Apr 27 '24 10:04 clsty

I tried with fcitx, but still can't repro. Can you check if 1d40af64d352bd5a87c7d53a52707fc5cfc6940e is a regressor? if the commit before that has the same issue, I don't think anything else has changed in hyprland's IME/TI in a while

vaxerski avatar Apr 27 '24 11:04 vaxerski

I tried with fcitx, but still can't repro. Can you check if 1d40af6 is a regressor? if the commit before that has the same issue, I don't think anything else has changed in hyprland's IME/TI in a while

Yes, I can confirm that 1d40af6 works normally without focus failure on my PC, along with fcitx5 5.1.9 from Arch Linux official repo.

clsty avatar Apr 27 '24 11:04 clsty

It happens to me as well, except sometimes keyboard input does not follow windows selection at all. I have to move the window(with a mouse) that i want to input to first. Killing fcitx5 fixed it.

Nannk avatar Apr 27 '24 12:04 Nannk

Can anyone try the latest git? 31d055f6d487bd72fca5b10822e3f3bd95e94cc9 fixed the issue for me.

The repro steps for me was

  1. Open 2 apps(terminal, firefox)
  2. Unselect the text input in firefox(click on the empty space to lose TI focus)
  3. Go back to terminal and the keyboard focus is still at firefox

sungyoonc avatar Apr 28 '24 05:04 sungyoonc

I have been tried the current latest git version in archlinuxcn 0.39.1.r91.2e763764-1. the issue was fixed.

vnwnv avatar Apr 28 '24 08:04 vnwnv

Yeah yay -S hyprland-git and clean build, install, reboot, it works.

clsty avatar Apr 28 '24 09:04 clsty

Can anyone try the latest git? 31d055f fixed the issue for me.

The repro steps for me was

  1. Open 2 apps(terminal, firefox)
  2. Unselect the text input in firefox(click on the empty space to lose TI focus)
  3. Go back to terminal and the keyboard focus is still at firefox

latest git version fixed the issue, thanks

cyrus-xc avatar Apr 28 '24 20:04 cyrus-xc

Will this be released soon? For now the Arch Linux git package is also broken and I can't figure out a way to fix it. No working hyprland for me unless I downgrade fcitx5, which seems to be bringing some other issues.

glyh avatar May 13 '24 12:05 glyh

Hmm, weird...

With Arch's prebuilt hyprland 40.0 the issue persists for me, but when using hyprland-git the issue is gone.

glyh avatar May 13 '24 12:05 glyh

NVM I can't repro this all of a sudden.

glyh avatar May 13 '24 13:05 glyh