Hyprland icon indicating copy to clipboard operation
Hyprland copied to clipboard

focus_on_activate not working

Open abs3ntdev opened this issue 10 months ago • 14 comments

Hyprland Version

System/Version info
Hyprland, built from branch main at commit 855a516596fa8a15aea7cf4b4068aba0293a9615  (core: add libinput backend support for headless session (5699)).
Date: Mon Apr 22 10:48:18 2024
Tag: v0.39.1-49-g855a5165, commits: 4509

flags: (if any)


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


GPU information: 
0a:00.0 VGA compatible controller [0300]: NVIDIA Corporation GA102 [GeForce RTX 3080] [10de:2206] (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?

Bug

Description

when a window activates focus is not set for that window

How to reproduce

set focus_on_activate=true then activate a window

Crash reports, logs, images, videos

No response

abs3ntdev avatar Apr 22 '24 21:04 abs3ntdev

test client?

vaxerski avatar Apr 23 '24 01:04 vaxerski

webcord running on workspace 2 switch to workspace 1 and either run webcord from command line or drun from rofi. it used to switch focus to webcord on workspace 2 now it just doesn't do anything. not sure if its not requesting focus or if something changed to make that behavior change.

abs3ntdev avatar Apr 23 '24 01:04 abs3ntdev

I had this too but as of https://github.com/hyprwm/Hyprland/commit/bb4646bbdf7d3490c2442347d852a62470aec2aa focus seems to work as expected

gksudolol avatar Apr 23 '24 16:04 gksudolol

updating to current head made me crash on start so im not able to check. logs: https://asdf.cafe/communal-alpaca.txt

abs3ntdev avatar Apr 23 '24 16:04 abs3ntdev

#5718

vaxerski avatar Apr 23 '24 20:04 vaxerski

still crashing on newest -git https://asdf.cafe/hardy-honeybee.txt

abs3ntdev avatar Apr 23 '24 20:04 abs3ntdev

can you bisect this one? it looks like hl is crashing while trying to parse your monitor config...?

vaxerski avatar Apr 23 '24 21:04 vaxerski

current head boots now. focus still doesn't switch to webcord when i do the steps i outlined above but it does work for other programs so im assuming webcord just isnt requesting focus

if i run webcord without --ozone-platform=wayland then focus on activate works for it

abs3ntdev avatar Apr 24 '24 01:04 abs3ntdev

if i run webcord without --ozone-platform=wayland then focus on activate works for it

FWIW I can't run Electron apps with --ozone-platform=wayland flag anymore since tearing/xdg-output split into hyprwayland-scanner

Only opens with --enable-features=UseOzonePlatform

gksudolol avatar Apr 24 '24 02:04 gksudolol

I think I also have this problem; when switching windows, the mouse pointer warps but if I just open a new window the focus stays on whatever the focus was on before and I have to actively switch into that windows after opening; I hope this is the same problem as described above?

MangoIV avatar Apr 24 '24 06:04 MangoIV

I think I also have this problem; when switching windows, the mouse pointer warps but if I just open a new window the focus stays on whatever the focus was on before and I have to actively switch into that windows after opening; I hope this is the same problem as described above?

Probably. I have the exact same issue.

0fie avatar Apr 24 '24 09:04 0fie

this is a regression as well; this worked until like a few days ago.

MangoIV avatar Apr 24 '24 09:04 MangoIV

I think my issue is gone? I don't know if that closes this one as well but at least when opening a new window, I get focus again.

MangoIV avatar May 01 '24 10:05 MangoIV

I can confirm that focus is not activated anymore if I open a file on firefox anymore. The file is opened silently on firefox and I don't get focused on the firefox window anymore.

KorigamiK avatar May 22 '24 11:05 KorigamiK

I can also confirm that focus_on_activate does not work for me as well. I thought I just did something wrong in the config but it seems like it is actually a bug.

AlephNought0 avatar Jun 20 '24 23:06 AlephNought0

it was working for some time for me but seems to have stopped working recently too. was working through June until i updated recently on nixpkgs-unstable

muni-corn avatar Jul 05 '24 18:07 muni-corn

focus_on_activate works for most apps but doesn't work for Chrome. If I click on a text file from Nautilus, Sublime Text will get the focus and open the file. I'm not sure when this stopped working but it should be marked as a regression, not a bug. I'm currently on 70468857da2e64c35c7e79b7e63bff04e56e3be5

RichAyotte avatar Jul 29 '24 18:07 RichAyotte

can confirm it seems broken for Chromium/Electron apps (Discord, Slack for me). Firefox seems to work as intended

muni-corn avatar Jul 29 '24 18:07 muni-corn

Does the following work with Firefox?

xdg-open https://baktz.com

In the console I see:

Opening in existing browser session.

Logs:

[LOG] Window 558fbeb06220 set title to Untitled - Google Chrome
[LOG] Searching for matching rules for google-chrome (title: Untitled - Google Chrome)
[LOG] Window 558fbeb06220 set title to baktz-website - Google Chrome
[LOG] Searching for matching rules for google-chrome (title: baktz-website - Google Chrome)

A new Chrome tab opens but it never gets focus.

If the browser is closed then everything works fine. The focus only fails when the browser is already open and a new tab is opened.

RichAyotte avatar Jul 29 '24 18:07 RichAyotte

Firefox correctly gets focus for me with xdg-open <website>, yes :grin:

muni-corn avatar Jul 30 '24 23:07 muni-corn