Skip to content

Focused windows do not get any animations when using window rules #1393

Description

@ItsShamed

Platform

NixOS 24.11.20241130.62c435d (Vicuna) x86_64

GPU, drivers, and screen setup

Display (PL2470H): 1920x1080 @ 165 Hz in 24" [External]
GPU 1: AMD Radeon RX 7700 XT [Discrete]
GPU 2: AMD Raphael [Integrated]

glxinfo -B output
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: AMD (0x1002)
    Device: AMD Radeon RX 7700 XT (radeonsi, navi32, LLVM 18.1.8, DRM 3.54, 6.6.63) (0x747e)
    Version: 24.2.6
    Accelerated: yes
    Video memory: 12288MB
    Unified memory: no
    Preferred profile: core (0x1)
    Max core profile version: 4.6
    Max compat profile version: 4.6
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2
Memory info (GL_ATI_meminfo):
    VBO free memory - total: 11006 MB, largest block: 11006 MB
    VBO free aux. memory - total: 15312 MB, largest block: 15312 MB
    Texture free memory - total: 11006 MB, largest block: 11006 MB
    Texture free aux. memory - total: 15312 MB, largest block: 15312 MB
    Renderbuffer free memory - total: 11006 MB, largest block: 11006 MB
    Renderbuffer free aux. memory - total: 15312 MB, largest block: 15312 MB
Memory info (GL_NVX_gpu_memory_info):
    Dedicated video memory: 12288 MB
    Total available memory: 27809 MB
    Currently available dedicated video memory: 11006 MB
OpenGL vendor string: AMD
OpenGL renderer string: AMD Radeon RX 7700 XT (radeonsi, navi32, LLVM 18.1.8, DRM 3.54, 6.6.63)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 24.2.6
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.6 (Compatibility Profile) Mesa 24.2.6
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.2 Mesa 24.2.6
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

Environment

WM: i3 v4.24 (X11)

picom version

v12.5

Diagnostics
**Version:** v12.5

### Extensions:

* Shape: Yes
* RandR: Yes
* Present: Present

### Misc:

* Use Overlay: No
  (Another compositor is already running)
* Config file specified: modules/home/desktop/files/picom.conf
* Config file used: modules/home/desktop/files/picom.conf

### Drivers (inaccurate):

modesetting

### Backend: egl

* Driver vendors:
 * EGL: Mesa Project
 * EGL driver: radeonsi
 * GL: AMD
* GL renderer: AMD Radeon RX 7700 XT (radeonsi, navi32, LLVM 18.1.8, DRM 3.54, 6.6.63)

### Backend: glx

* Driver vendors:
 * GLX: Mesa Project and SGI
 * GL: AMD
* GL renderer: AMD Radeon RX 7700 XT (radeonsi, navi32, LLVM 18.1.8, DRM 3.54, 6.6.63)
* Accelerated: 1

Configuration:

Configuration file
backend = "glx";

fade-delta = 5;
fade-in-step = 0.075;
fade-out-step = 0.03;
fading = true;

rules = (
  {
    match = "focused";
    opacity = 1.0;
    fade = true;
  },
  {
    match = "!focused";
    opacity = 0.75;
    fade = true;
  },

  {
    match = "window_type = 'utility' || window_type = 'notification'";
    shadow = false;
    opacity = 1.0;
  },

  {
    match = "class_g = 'i3-frame' || class_i = 'i3-frame'";
    opacity = 1.0;
    animations = (
      {
        triggers = [ "close", "hide" ];
        preset = "slide-out";
        direction = "down";
        duration = 0.1;
      },
      {
        triggers = [ "open", "show" ];
        preset = "slide-in";
        direction = "down";
        duration = 0.1;
      },
    )
  },

  {
    match = "window_type = 'dock'";
    shadow = true;
    opacity = 1.0;
    animations = (
      {
        triggers = [ "close", "hide" ];
        preset = "slide-out";
        direction = "up";
        duration = 0.1;
      },
      {
        triggers = [ "open", "show" ];
        preset = "slide-in";
        direction = "up";
        duration = 0.1;
      },
    )
  },

  {
    match = "class_g = 'Dunst'";
    shadow = false;
    animations = (
      {
        triggers = [ "close", "hide" ];
        preset = "slide-out";
        direction = "right";
        duration = 0.1;
      },
      {
        triggers = [ "open", "show" ];
        preset = "slide-in";
        direction = "right";
        duration = 0.1;
      },
    )
  },
  { match = "class_g = 'Screenkey'"; shadow = false; },
  { match = "class_g = 'screenkey'"; shadow = false; },

  {
    match = "window_type = 'dropdown_menu' || window_type = 'popup_menu' || window_type = 'menu' || window_type = 'tooltip'";
    opacity = 1;
    fade = false;
    full-shadow = true;
  },

  {
    match = "class_i = 'rofi' || class_g = 'Rofi'";
    fade = true;
    opacity = 1;
    full-shadow = true;
  }
)

shadow = true;
shadow-offset-x = -15;
shadow-offset-y = -15;
shadow-opacity = 0.750000;
vsync = false;

animations = (
  {
    triggers = [ "geometry" ];
    preset = "geometry-change";
    duration = 0.1;
  },
  {
    triggers = [ "close", "hide" ];
    preset = "disappear"
    duration = 0.1;
  },
  {
    triggers = [ "open", "show" ];
    preset = "appear";
    duration = 0.1;
  }
)

Steps of reproduction

  1. Have one workspace with two windows and focus one of them.
  2. Switch to an empty workspace (better to visualise).
  3. Switch back to the workspace with the two windows.

Also applicable to cycling through scratchpad windows.

Expected behavior

The focused window should have the open/show animation.

Current Behavior

The focused window discards the open/show animation.

Other details

picom_demo.mp4

EDIT: Toyed a bit around more, it seems that no animations are rendered at all on focused windows. The fact that they do get close/hide animations is because they are actually unfocused.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions