From 55b4f84fea33adee3ec4b0a69c2bca6e7a1f5754 Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Sat, 4 Nov 2023 17:03:05 +0000 Subject: Internal: Hyprland box implementation (#3755) * box impl * remove unused operators * missed applyfromwlr --- src/protocols/Screencopy.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/protocols/Screencopy.cpp') diff --git a/src/protocols/Screencopy.cpp b/src/protocols/Screencopy.cpp index aaec0fab..63ba8832 100644 --- a/src/protocols/Screencopy.cpp +++ b/src/protocols/Screencopy.cpp @@ -183,7 +183,7 @@ void CScreencopyProtocolManager::removeFrame(SScreencopyFrame* frame, bool force m_lFrames.remove(*frame); } -void CScreencopyProtocolManager::captureOutput(wl_client* client, wl_resource* resource, uint32_t frame, int32_t overlay_cursor, wl_resource* output, wlr_box box) { +void CScreencopyProtocolManager::captureOutput(wl_client* client, wl_resource* resource, uint32_t frame, int32_t overlay_cursor, wl_resource* output, CBox box) { const auto PCLIENT = clientFromResource(resource); const auto PFRAME = &m_lFrames.emplace_back(); @@ -239,8 +239,7 @@ void CScreencopyProtocolManager::captureOutput(wl_client* client, wl_resource* r } int ow, oh; wlr_output_effective_resolution(PFRAME->pMonitor->output, &ow, &oh); - wlr_box_transform(&PFRAME->box, &PFRAME->box, PFRAME->pMonitor->transform, ow, oh); - scaleBox(&PFRAME->box, PFRAME->pMonitor->scale); + PFRAME->box.transform(PFRAME->pMonitor->transform, ow, oh).scale(PFRAME->pMonitor->scale); PFRAME->shmStride = (PSHMINFO->bpp / 8) * PFRAME->box.width; -- cgit v1.2.3