Hyprland icon indicating copy to clipboard operation
Hyprland copied to clipboard

Fix float windows

Open h0tc0d3 opened this issue 7 months ago • 10 comments

Changelog:

  • Add vector2 parameter general:float_min_crop for support minimal cropping size for windows that cannot transition to float. If 0 < value < 1.0 then use part of windows size, else pixel size. Example: 0.1 0.2, 400 300
  • Add parameter general:float_center_screen to control spawn new float windows. 1 - New float windows spawn in center screen. 0 - Сonsider the trimming at the top and bottom to calculate the center of the screen. For example, consider the size of the waybar.
  • Fix float windows
  • Fix togglefloat. Window did not return to the center of the screen, for example, if there are two windows on the desktop, then the float window is positioned in the center of half the screen.
  • Fix windows that start float and then go into a normal window, aka program launchers. Example: Blizzard battle.net client. The bug render full-screen programs partially behind the screen. Now the xwayland games launch normally.
  • Code cleanup and refactoring.
  • Replaced vec() with goalv() in logic other than animation, it seemed to me more correct because goalv() is used in many places. Not sure if this is correct.

Related bug reports: https://github.com/hyprwm/Hyprland/issues/3029

Tested programs: Blender, Jetbrains IDEs, Blizzard battle.net client, qt float program.

Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.) No

Is it ready for merging, or does it need work? Yes.

Fix this: screenshot_1700794200 screenshot_1700799073

h0tc0d3 avatar Nov 25 '23 03:11 h0tc0d3