Tony Miller 334b361c8d screenshare: round captureBox after scaling to fix region capture at fractional scales (#14257)
After scaling m_captureBox from logical to pixel coordinates, the box may
have non-integer dimensions (e.g. logical 401x301 at scale 1.25 -> pixel
501.25x376.25). m_bufferSize is then computed as captureBox.size() and
sent to the client as int32 width/height (truncating the fraction), but
m_bufferSize itself stays as a fractional Vector2D.

When the client allocates the integer-sized buffer and submits it,
CScreenshareFrame::share() rejects it with ERROR_BUFFER_SIZE because
Vector2D::operator== is exact double comparison: (501, 376) != (501.25,
376.25). The frame is sent failed, and the client retries forever.

The SHARE_WINDOW path already rounds its bufferSize; the SHARE_REGION
path didn't. Round the captureBox immediately after scaling so all
downstream consumers (m_bufferSize, render translates) see clean integer
pixel coordinates.

Reproducer at scale 1.25 on a 1920x1080 monitor:

  wf-recorder -g '500,200 401x301' -f /tmp/x.mp4
  # "Failed to copy frame, retrying..." until exit

  wf-recorder -g '500,200 400x300' -f /tmp/x.mp4
  # works (400*1.25=500, 300*1.25=375, both integer)
2026-05-02 21:06:00 +01:00
2025-11-17 08:54:47 +02:00
2026-04-04 08:50:36 -04:00
2026-04-26 14:16:54 +00:00
2026-04-29 21:31:06 +01:00
2026-05-01 12:50:55 +01:00
2026-04-30 11:15:32 +03:00
2026-01-05 12:57:40 +01:00
2026-05-01 23:50:57 +01:00
2026-04-04 08:50:36 -04:00
2026-04-29 21:31:06 +01:00
2026-03-02 21:03:44 +02:00
2026-01-11 16:13:52 +01:00
2026-02-27 18:03:19 +00:00

banner

Badge Workflow Badge License Badge Language Badge Pull Requests Badge Issues Badge Hi Mom


Hyprland is a 100% independent, dynamic tiling Wayland compositor that doesn't sacrifice on its looks.

It provides the latest Wayland features, is highly customizable, has all the eyecandy, the most powerful plugins, easy IPC, much more QoL stuff than other compositors and more...


 
 Install 
 
   
 Quick Start 
 
   
 Configure 
 
   
 Contribute 
 



Features

  • All of the eyecandy: gradient borders, blur, animations, shadows and much more
  • A lot of customization
  • 100% independent, no wlroots, no libweston, no kwin, no mutter.
  • Custom bezier curves for the best animations
  • Powerful plugin support
  • Built-in plugin manager
  • Tearing support for better gaming performance
  • Easily expandable and readable codebase
  • Fast and active development
  • Not afraid to provide bleeding-edge features
  • Config reloaded instantly upon saving
  • Fully dynamic workspaces
  • Two built-in layouts and more available as plugins
  • Global keybinds passed to your apps of choice
  • Tiling/pseudotiling/floating/fullscreen windows
  • Special workspaces (scratchpads)
  • Window groups (tabbed mode)
  • Powerful window/monitor/layer rules
  • Socket-based IPC
  • Native IME and Input Panels Support
  • and much more...


Gallery


Preview A


Preview B


Preview C



Special Thanks


wlroots - For powering Hyprland in the past

tinywl - For showing how 2 do stuff

Sway - For showing how 2 do stuff the overkill way

Vivarium - For showing how 2 do stuff the simple way

dwl - For showing how 2 do stuff the hacky way

Wayfire - For showing how 2 do some graphics stuff

S
Description
Hyprland is an independent, highly customizable, dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
Readme BSD-3-Clause
222 MiB
Languages
C++ 95.1%
GLSL 2%
Shell 0.8%
CMake 0.5%
Nix 0.5%
Other 1%