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

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

Closed
glyh opened this issue Apr 27, 2024 · 18 comments
Closed

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

glyh opened this issue Apr 27, 2024 · 18 comments
Labels
bug Something isn't working

Comments

@glyh
Copy link

glyh commented Apr 27, 2024

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 glyh added the bug Something isn't working label Apr 27, 2024
@vaxerski
Copy link
Member

doesn't happen on my end. Config?

@glyh
Copy link
Author

glyh commented Apr 27, 2024

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.

@vaxerski
Copy link
Member

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

@hftsai256
Copy link

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.

@glyh
Copy link
Author

glyh commented Apr 27, 2024

@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
Copy link
Author

glyh commented Apr 27, 2024

@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 glyh changed the title Can't focus newly opened kitty(terminal emulator) and tofi(launcher) without switching workspaces. Keyboard focus failed on newly opened kitty and tofi(launcher) Apr 27, 2024
@glyh
Copy link
Author

glyh commented Apr 27, 2024

Looks like this is exactly fcitx/fcitx5#1031 and a duplicate of #5764.

@clsty
Copy link

clsty commented Apr 27, 2024

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: fcitx/fcitx5#1031 (comment)

@vaxerski
Copy link
Member

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

@clsty
Copy link

clsty commented Apr 27, 2024

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.

@Nannk
Copy link

Nannk commented Apr 27, 2024

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.

@glyh glyh changed the title Keyboard focus failed on newly opened kitty and tofi(launcher) No keyboard focus on newly launched terminal emulator, etc. with Fcitx Apr 27, 2024
@sungyoonc
Copy link
Contributor

sungyoonc commented Apr 28, 2024

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

@vnwnv
Copy link

vnwnv commented Apr 28, 2024

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

@clsty
Copy link

clsty commented Apr 28, 2024

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

@cyrus-xc
Copy link

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

@glyh
Copy link
Author

glyh commented May 13, 2024

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
Copy link
Author

glyh commented May 13, 2024

Hmm, weird...

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

@glyh
Copy link
Author

glyh commented May 13, 2024

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

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

No branches or pull requests

8 participants