hyprwm / Hyprland

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

Windowrule 'xray 0' forces opaque window #6161

Open calebaden opened 5 months ago

calebaden commented 5 months ago

Hyprland Version

System/Version info ```sh Hyprland, built from branch main at commit 2ead1fd22103ce065661555513bace5897083ded (virtual-keyboard: emit event before finishing keyboard). Date: Sat May 18 05:07:33 2024 Tag: v0.40.0-111-g2ead1fd2, commits: 4717 flags: (if any) System Information: System name: Linux Node name: arch Release: 6.9.1-arch1-1 Version: #1 SMP PREEMPT_DYNAMIC Fri, 17 May 2024 16:56:38 +0000 GPU information: 2d:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 23 [Radeon RX 6600/6600 XT/6600M] [1002:73ff] (rev c1) (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

Using a config with xray=true and then using a windowrule with xray 0 on a window with a transparent background results in that window being completely opaque.

How to reproduce

  1. Use the below settings in your hyprland config to enable blur and xray, and to disable blur on a specific window of your choice.
    
    decoration {
    blur {
        enabled = true
        xray = true
    }
    }

windowrulev2 = xray 0,class:^(kitty)$


2. Edit the background opacity of your window of choice to be below 1.0 (eg. `background_opacity` in `~/.config/kitty/kitty.conf`
3. Open the window

### Crash reports, logs, images, videos

![2024-05-20-102426_hyprshot](https://github.com/hyprwm/Hyprland/assets/17247320/300d2ed8-71ed-4f0d-a237-ab7c132a73ff)
The-Briel-Deal commented 5 months ago

Uhhh. When I do this it makes my windows fully translucent?

decoration {
    blur {
        enabled = true
        xray = true
    }
}

windowrulev2 = opacity 0,class:^(kitty)$
windowrulev2 = xray 0,class:^(kitty)$

And when I leave opacity above 0 like at .85 its still transparent, just not as much so?

Can you provide your full config?

And what is the behavior you expect?

calebaden commented 5 months ago

Sorry I should clarify, the opacity needs to be set in the application not the hyprland config. So for kitty it would be background_opacity 0.85 in ~/.config/kitty/kitty.conf.