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

noinitialfocus not working on electron apps #9567

Closed
4 of 6 tasks
Flix3r opened this issue Mar 8, 2025 · 8 comments · Fixed by #9586
Closed
4 of 6 tasks

noinitialfocus not working on electron apps #9567

Flix3r opened this issue Mar 8, 2025 · 8 comments · Fixed by #9586
Labels
bug Something isn't working

Comments

@Flix3r
Copy link

Flix3r commented Mar 8, 2025

Already reported ? *

  • I have searched the existing open and closed issues.

Regression?

I don't know, I started using Hyprland only recently

System Info and Hyprland Version

System/Version info
Hyprland 0.47.2 built from branch  at commit 882f7ad7d2bbfc7440d0ccaef93b1cdd78e8e3ff  (version: bump to 0.47.2).
Date: Sun Feb 2 00:47:17 2025
Tag: v0.47.2, commits: 5767
built against:
 aquamarine 0.7.2
 hyprlang 0.6.0
 hyprutils 0.5.0
 hyprcursor 0.1.11
 hyprgraphics 0.1.2


no flags were set


System Information:
System name: Linux
Node name: flix3r
Release: 6.13.3-arch1-1
Version: #1 SMP PREEMPT_DYNAMIC Mon, 17 Feb 2025 17:42:11 +0000


GPU information: 
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation TU116 [GeForce GTX 1650] [10de:2188] (rev a1) (prog-if 00 [VGA controller])
05:00.0 Non-Volatile memory controller [0108]: Solid State Storage Technology Corporation CL1-3D256-Q11 NVMe SSD M.2 [1e95:9100] (rev 03) (prog-if 02 [NVM Express])
NVRM version: NVIDIA UNIX Open Kernel Module for x86_64  570.86.16  Release Build  (archlinux-builder@)  


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:

Description

The noinitialfocus window rule does not work on electron apps. I have tried it on Spotify, Vesktop, and caprine.

How to reproduce

  1. Add windowrulev2 = noinitialfocus, <some_electron_app> to your hyprland.conf.
  2. Open the electron app.
  3. See it instantly getting focused.

Attach not paste

  • I understand that all text files must be attached, and not pasted directly. If not respected, this issue will likely get closed as spam

Checklist of files to include below

  • Hyprland config - hyprctl systeminfo -c (always include)
  • Crash report (always include in case of crash)
  • Video (always include in case of a visual bug)
  • Logs (might contain useful info such as errors)

Additional info & File uploads

hyprland_config_dump.txt
hyprland.log

@Flix3r Flix3r added the bug Something isn't working label Mar 8, 2025
@nnyyxxxx
Copy link
Contributor

nnyyxxxx commented Mar 8, 2025

seems to be working for me, perhaps you are moving your mouse while the application is being launched?

@nnyyxxxx
Copy link
Contributor

nnyyxxxx commented Mar 8, 2025

https://wiki.hyprland.org/Configuring/Variables/#input

there are a lot of things here that could cause window focus to happen

notable example:

Image

@Flix3r
Copy link
Author

Flix3r commented Mar 8, 2025

No, I don't even have the workspace it launches on open.

@nnyyxxxx
Copy link
Contributor

nnyyxxxx commented Mar 9, 2025

I think this might be a dupe of #9365 then?

No, I don't even have the workspace it launches on open.

@Flix3r
Copy link
Author

Flix3r commented Mar 9, 2025

I don't think so, as the cursor also jumps to where the new window opened

EDIT: Nevermind, I think the window opens at the cursor instead

@nnyyxxxx
Copy link
Contributor

nnyyxxxx commented Mar 9, 2025

So basically:

You spawn a window
The window is set to spawn on another workspace that was specifically specified
the window receives focus even if noinitialfocus is specified in your config
and you are brought to the workspace where the spawned window is

Am I correct? or am i misunderstanding this issue

going based off of this:

No, I don't even have the workspace it launches on open.

@Flix3r
Copy link
Author

Flix3r commented Mar 9, 2025

Correct.

@nnyyxxxx
Copy link
Contributor

nnyyxxxx commented Mar 9, 2025

Alright, #9586 will fix this issue

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

Successfully merging a pull request may close this issue.

2 participants