hyprwm / Hyprland

Hyprland is a highly customizable dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
18.21k stars 757 forks source link

IPC: Incorrect serie of event when a monitor is disabled #6327

Open fdev31 opened 1 month ago

fdev31 commented 1 month ago

System Info and Version

System/Version info ```sh Hyprland, built from branch at commit cba1ade848feac44b2eda677503900639581c3f4 (props: bump version to 0.40.0). Date: Sat May 4 15:42:32 2024 Tag: v0.40.0, commits: 4606 flags: (if any) System Information: System name: Linux Node name: gamix Release: 6.9.3-arch1-1 Version: #1 SMP PREEMPT_DYNAMIC Fri, 31 May 2024 15:14:45 +0000 GPU information: 01:00.0 VGA compatible controller [0300]: NVIDIA Corporation AD103 [GeForce RTX 4080] [10de:2704] (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

An unexpected list of events is received when a screen is disabled. Here the focused workspace is "5", when I switch the unfocused screen off(using hyprctl --batch " keyword monitor HDMI-A-1,disable ; keyword monitor DP-1,3440x1440@100.00Hz,0x1080,1.000000,transform,0 ; ") it emits workspace 3:

Socket:

createworkspace>>5
createworkspacev2>>5,5
activewindow>>,
activewindowv2>>
workspace>>5
workspacev2>>5,5
activewindow>>kitty,socat
activewindowv2>>5ab3cc64ed50
workspace>>4
workspacev2>>4,4
destroyworkspace>>5
destroyworkspacev2>>5,5
activewindow>>kitty,~
activewindowv2>>5ab3cc68c070
windowtitle>>5ab3cc68c070
activewindow>>kitty,wlrlui one-screen (~)
activewindowv2>>5ab3cc68c070
windowtitle>>5ab3cc68c070
activewindow>>kitty,wlrlui one-screen
activewindowv2>>5ab3cc68c070
activelayout>>power-button,French
activelayout>>power-button,French
activelayout>>video-bus,French
activelayout>>video-bus,French
activelayout>>power-button-1,French
activelayout>>power-button-1,French
activelayout>>logitech-k780,French
activelayout>>logitech-k780,French
activelayout>>logitech-m720-triathlon,French
activelayout>>logitech-m720-triathlon,French
activelayout>>usb-pnp-audio-device,French
activelayout>>usb-pnp-audio-device,French
activelayout>>usb-sound-device--------,French
activelayout>>usb-sound-device--------,French
configreloaded>>
closelayer>>wallpaper
monitorremoved>>HDMI-A-1
createworkspace>>3
createworkspacev2>>3,3
workspace>>3
workspacev2>>3,3
moveworkspace>>2,DP-1
moveworkspacev2>>2,2,DP-1
destroyworkspace>>2
destroyworkspace>>3
destroyworkspacev2>>2,2
destroyworkspacev2>>3,3
windowtitle>>5ab3cc68c070
activewindow>>kitty,~
activewindowv2>>5ab3cc68c070
activewindow>>kitty,socat
activewindowv2>>5ab3cc64ed50

How to reproduce

Crash reports, logs, images, videos

No response

fdev31 commented 1 month ago

It looks like this could be improved further, the list of events is quite misleading and not reflecting the real activity. Events of a workspace attached to a monitor being destroyed shouldn't be received IMO.