mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 14:26:00 +01:00
damage drag and drop
This commit is contained in:
parent
208864cba9
commit
6ec16fdcda
2 changed files with 7 additions and 1 deletions
|
@ -568,9 +568,12 @@ void CInputManager::updateDragIcon() {
|
||||||
switch (g_pInputManager->m_sDrag.dragIcon->drag->grab_type) {
|
switch (g_pInputManager->m_sDrag.dragIcon->drag->grab_type) {
|
||||||
case WLR_DRAG_GRAB_KEYBOARD:
|
case WLR_DRAG_GRAB_KEYBOARD:
|
||||||
break;
|
break;
|
||||||
case WLR_DRAG_GRAB_KEYBOARD_POINTER:
|
case WLR_DRAG_GRAB_KEYBOARD_POINTER: {
|
||||||
|
wlr_box box = {g_pInputManager->m_sDrag.pos.x - 2, g_pInputManager->m_sDrag.pos.y - 2, g_pInputManager->m_sDrag.dragIcon->surface->current.width + 4, g_pInputManager->m_sDrag.dragIcon->surface->current.height + 4};
|
||||||
|
g_pHyprRenderer->damageBox(&box);
|
||||||
g_pInputManager->m_sDrag.pos = g_pInputManager->getMouseCoordsInternal();
|
g_pInputManager->m_sDrag.pos = g_pInputManager->getMouseCoordsInternal();
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -627,6 +627,9 @@ void CHyprRenderer::renderDragIcon(SMonitor* pMonitor, timespec* time) {
|
||||||
renderdata.h = g_pInputManager->m_sDrag.dragIcon->surface->current.height;
|
renderdata.h = g_pInputManager->m_sDrag.dragIcon->surface->current.height;
|
||||||
|
|
||||||
wlr_surface_for_each_surface(g_pInputManager->m_sDrag.dragIcon->surface, renderSurface, &renderdata);
|
wlr_surface_for_each_surface(g_pInputManager->m_sDrag.dragIcon->surface, renderSurface, &renderdata);
|
||||||
|
|
||||||
|
wlr_box box = {g_pInputManager->m_sDrag.pos.x - 2, g_pInputManager->m_sDrag.pos.y - 2, g_pInputManager->m_sDrag.dragIcon->surface->current.width + 4, g_pInputManager->m_sDrag.dragIcon->surface->current.height + 4};
|
||||||
|
g_pHyprRenderer->damageBox(&box);
|
||||||
}
|
}
|
||||||
|
|
||||||
DAMAGETRACKINGMODES CHyprRenderer::damageTrackingModeFromStr(const std::string& mode) {
|
DAMAGETRACKINGMODES CHyprRenderer::damageTrackingModeFromStr(const std::string& mode) {
|
||||||
|
|
Loading…
Reference in a new issue