Skip to content

Commit

Permalink
dnd
Browse files Browse the repository at this point in the history
  • Loading branch information
vaxerski committed Dec 10, 2024
1 parent f589d2a commit 4d44152
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/protocols/core/DataDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "../../managers/SeatManager.hpp"
#include "../../managers/PointerManager.hpp"
#include "../../Compositor.hpp"
#include "../../render/pass/TexPassElement.hpp"
#include "Seat.hpp"
#include "Compositor.hpp"

Expand Down Expand Up @@ -688,7 +689,11 @@ void CWLDataDeviceProtocol::renderDND(PHLMONITOR pMonitor, timespec* when) {
const auto POS = g_pInputManager->getMouseCoordsInternal();

CBox box = CBox{POS, dnd.dndSurface->current.size}.translate(-pMonitor->vecPosition + g_pPointerManager->cursorSizeLogical() / 2.F).scale(pMonitor->scale);
g_pHyprOpenGL->renderTexture(dnd.dndSurface->current.texture, &box, 1.F);

CTexPassElement::SSimpleRenderData data;
data.tex = dnd.dndSurface->current.texture;
data.box = box;
g_pHyprRenderer->m_sRenderPass.add(makeShared<CTexPassElement>(data));

box = CBox{POS, dnd.dndSurface->current.size}.translate(g_pPointerManager->cursorSizeLogical() / 2.F);
g_pHyprRenderer->damageBox(&box);
Expand Down

0 comments on commit 4d44152

Please sign in to comment.