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
20.95k stars 879 forks source link

Resize Window/Client: Add option to Blank, Dim and/or Hide resize changes until completion #5593

Open nine7nine opened 6 months ago

nine7nine commented 6 months ago

Description

I wish Hyprland had an option (maybe put into a windowrule?), where you could set certain windows/clients to not render on resize changes until the resize is complete -- while this doesn't typically affect native apps (eg: Gtk/Qt apps), it does look pretty bad with browsers, web apps, xwayland apps, etc.

The idea would be that when i go to resize on of these affected apps - it doesn't try to constantly redraw the window contents, while I am resizing and instead should just blank (dim or fade to bg color?) the window/client, until I finish resizing it -- and only then draw the finished resized window contents.

Here is an example:

  1. I am resizing between chrome apps
  2. I go to the other desktop and use TextMaker (xwayland example)
  3. I show how togglesplit works with chrome apps (which almost has the desired affect; although due to chrome, i think)

https://github.com/hyprwm/Hyprland/assets/20159346/0d201be6-4eda-471a-897b-bee83908d77d

not included in the video is also when centering a window, or moving it (such as when using a mouse or touch device to move it) -- but it's the same thing: the window is resized. IMO, it looks pretty janky/fugly... it would be nice if there was some kind of override/option to mitigate this... and unless I am mistaken; there isn't..?

The-Briel-Deal commented 5 months ago

I'll look into this, I've had this crash games before as well, for example in CS2 if you do a drag resize it will hang for like 15 seconds and sometimes crash.

nine7nine commented 5 months ago

@The-Briel-Deal - Nice. I do think this is something worth investigating. The resizing thing seems a bit wonky at times, for sure... I'm just NOT familiar enough with hyprland's codebase to be the guy to do it... Aside from having a few PRs merged into plugins, I haven't touched Hyprland's code at all....

And yeah; I've also had resizing crash an app or two. Not recently, but when I first starting using hyprland months ago. Unfortunately, I did not gather logs (but will in the future).