mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-10 07:26:01 +01:00
map touch to the correct output
This commit is contained in:
parent
190ddb5697
commit
d7ef19e2e7
1 changed files with 4 additions and 1 deletions
|
@ -2,7 +2,10 @@
|
||||||
#include "../../Compositor.hpp"
|
#include "../../Compositor.hpp"
|
||||||
|
|
||||||
void CInputManager::onTouchDown(wlr_touch_down_event* e) {
|
void CInputManager::onTouchDown(wlr_touch_down_event* e) {
|
||||||
wlr_cursor_warp(g_pCompositor->m_sWLRCursor, g_pCompositor->m_sSeat.mouse->mouse, g_pCompositor->m_pLastMonitor->vecPosition.x + e->x * g_pCompositor->m_pLastMonitor->vecSize.x, g_pCompositor->m_pLastMonitor->vecPosition.y + e->y * g_pCompositor->m_pLastMonitor->vecSize.y);
|
auto PMONITOR = g_pCompositor->getMonitorFromName(e->touch->output_name ? e->touch->output_name : "");
|
||||||
|
PMONITOR = PMONITOR ? PMONITOR : g_pCompositor->m_pLastMonitor;
|
||||||
|
|
||||||
|
wlr_cursor_warp(g_pCompositor->m_sWLRCursor, g_pCompositor->m_sSeat.mouse->mouse, PMONITOR->vecPosition.x + e->x * PMONITOR->vecSize.x, PMONITOR->vecPosition.y + e->y * PMONITOR->vecSize.y);
|
||||||
|
|
||||||
refocus();
|
refocus();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue