Open koeqaife opened 3 months ago
what kind of discord are you using?
Vencord
This is happening because Discord is an XWayland client and Hyprland doesn't appear to be sending keyboard leave events to XWayland clients. Discord thinks it still has focus so it doesn't raise any notifications. You can see this because the blinking cursor in Discord remains even when the window doesn't have focus.
A workaround is to make Discord use Wayland by starting it with --enable-features=UseOzonePlatform --ozone-platform=wayland
.
The same thing occurs with Slack, and the workaround is the same for that too.
if you know why that happens feel free to make a MR, I thought we do, but I am pretty sure the issue has existed for as long as hyprland was around.
I noticed that when the program in another workspace drops fps to 1 I think this may be the problem, when the discord window on the other screen everything is ok
sometimes I get kicked out of voice and have to go back to workspace with discord
i don't know if it's related but I'm using Vesktop client and I've set it to open up with Super + D and from Vesktop settings I've set it up to close it to tray when i Alt + F4, my problem is that after it goes back to tray and when i open up Vesktop again with Super + D, the autofocus doesn't work and i have to move my mouse to focus on it again which is kinda frustrating because my hands have to leave the keyboard. All my other apps get focused correctly depending on the position of the mouse when i open them. I think closing it to tray is causing the issue. I'm on Hyprland 0.42.0
A workaround is to make Discord use Wayland by starting it with
--enable-features=UseOzonePlatform --ozone-platform=wayland
.The same thing occurs with Slack, and the workaround is the same for that too.
Offtop
@RyanDwyer How to use pass
or sendshortcut
to Discord when it's in Wayland mode?
https://github.com/hyprwm/Hyprland/issues/7435#issuecomment-2301468786
This is happening because Discord is an XWayland client and Hyprland doesn't appear to be sending keyboard leave events to XWayland clients. Discord thinks it still has focus so it doesn't raise any notifications. You can see this because the blinking cursor in Discord remains even when the window doesn't have focus.
A workaround is to make Discord use Wayland by starting it with
--enable-features=UseOzonePlatform --ozone-platform=wayland
.The same thing occurs with Slack, and the workaround is the same for that too.
It's the same issue I reported here #6468, and it's not just the keyboard. Try hovering on a link/object in discord then moving focus to a Wayland window with the keyboard.
This bug unfortunately means that if Discord is your only XWayland application getting desktop notifications is impossible, because it is always focused. The inability to get Discord and/or idle game notifications is a daily problem for me. I try to remember to reset focus to an XWayland window without alerts (I use Brave for it) as often as possible.
Regression?
No
System Info and Version
System/Version info
```sh Hyprland, built from branch main at commit 01ff5fdf6a00a9231bd3b56400d8bcab378c4257 (cursor: make inactive_timeout setting a float (7268)). Date: Sat Aug 10 22:42:45 2024 Tag: v0.42.0-7-g01ff5fdf, commits: 5076 flags: (if any) System Information: System name: Linux Node name: latitude-3420 Release: 6.10.3-zen1-2-zen Version: #1 ZEN SMP PREEMPT_DYNAMIC Tue, 06 Aug 2024 07:47:21 +0000 GPU information: 00:02.0 VGA compatible controller [0300]: Intel Corporation TigerLake-LP GT2 [Iris Xe Graphics] [8086:9a49] (rev 01) (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: hyprwinwrap by Vaxry ver 1.0 ======Config-Start====== Config File: /home/mrdan/.config/hypr/hyprland.conf: Read Succeeded # Monitor (custom) source = ~/dotfiles/hypr/conf/custom/monitor.conf # Autostart source = ~/dotfiles/hypr/conf/autostart.conf # Environment source = ~/dotfiles/hypr/conf/environment.conf source = ~/dotfiles/hypr/conf/custom/environment.conf # Input (custom) source = ~/dotfiles/hypr/conf/custom/input.conf # Material colors source = ~/.cache/material/colors-hyprland.conf # Some files source = ~/dotfiles/hypr/conf/window.conf source = ~/dotfiles/hypr/conf/decoration.conf source = ~/dotfiles/hypr/conf/layout.conf source = ~/dotfiles/hypr/conf/misc.conf source = ~/dotfiles/hypr/conf/keybinding.conf source = ~/dotfiles/hypr/conf/windowrule.conf # Animations source = ~/dotfiles/hypr/conf/animation.conf # Apps source = ~/dotfiles/hypr/conf/apps.conf # Custom source = ~/dotfiles/hypr/conf/custom/general.conf source = ~/dotfiles/hypr/conf/custom/cursor.conf # xdg exec-once=dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP Config File: /home/mrdan/dotfiles/hypr/conf/custom/monitor.conf: Read Succeeded monitor=HDMI-A-1, 1680x1050@60, -1680x0, 1 monitor=eDP-1, 1920x1080@60, 0x0, 1 Config File: /home/mrdan/dotfiles/hypr/conf/autostart.conf: Read Succeeded # Setup XDG exec-once = ~/dotfiles/hypr/scripts/xdg.sh # Start Polkit exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 # Using hypridle to start hyprlock exec-once = hypridle # START APPLETS exec-once = nm-applet --indicator exec-once = blueman-applet # Load cliphist history exec-once = wl-paste --watch cliphist store # Initialize Wallpaper Engine exec-once = ~/dotfiles/hypr/scripts/init-wallpaper-engine.sh # exec-once = easyeffects --gapplication-service # start AGS exec-once = ags # Udiskie exec-once = udiskie & # Update checker exec-once = ~/dotfiles/scripts/update_timer.sh Config File: /home/mrdan/dotfiles/hypr/conf/environment.conf: Read Succeeded env = XCURSOR_SIZE,24 env = XDG_CURRENT_DESKTOP,Hyprland env = XDG_SESSION_TYPE,wayland env = XDG_SESSION_DESKTOP,Hyprland env = QT_QPA_PLATFORM,wayland;xcb env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1 env = QT_AUTO_SCREEN_SCALE_FACTOR,1 env = QT_QPA_PLATFORMTHEME,qt5ct env = MOZ_ENABLE_WAYLAND,1 env = GDK_SCALE,1 env = SDL_VIDEODRIVER,wayland env = ELECTRON_ENABLE_WAYLAND, 1 env = ELECTRON_OZONE_PLATFORM_HINT, wayland Config File: /home/mrdan/dotfiles/hypr/conf/custom/environment.conf: Read Succeeded # https://wiki.hyprland.org/Configuring/Environment-variables/ Config File: /home/mrdan/dotfiles/hypr/conf/custom/input.conf: Read Succeeded input { kb_layout = us, ru kb_variant = kb_model = kb_options = grp:alt_shift_toggle numlock_by_default = true follow_mouse = 1 touchpad { natural_scroll = false } sensitivity = 0 } Config File: /home/mrdan/.cache/material/colors-hyprland.conf: Read Succeeded $background = rgb(1a1110) $foreground = rgb(f1dfdb) $border_color_active = rgb(ffb4a7) $border_color_inactive = rgb(7f5a53) #Description
When the discord window is in another workspace sometimes notifications don't come and voice may not work, everything works if close discord and it will be in the tray
How to reproduce
put the discord window in another workspace and wait
Crash reports, logs, images, videos
No response