From 26bf52cb7134b21381cb98e042650e5a7232d3e6 Mon Sep 17 00:00:00 2001
From: darkuss <darkussdelta@gmail.com>
Date: Sat, 22 Aug 2026 23:05:36 +0200
Subject: use pointer events instead of mouse ones

---
 src/desktop/window.tsx | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

(limited to 'src/desktop/window.tsx')

diff --git a/src/desktop/window.tsx b/src/desktop/window.tsx
index a493bcf..ae91d27 100644
--- a/src/desktop/window.tsx
+++ b/src/desktop/window.tsx
@@ -16,8 +16,8 @@ export function Window(props: Window.Props) {
                 dragTimeout.current = setTimeout(() => {
                     dragging.value = false
                     dragTimeout.current = null;
-                    props.desktop.current?.removeEventListener("mousemove", onUpdatePosition)
-                    props.desktop.current?.removeEventListener("mouseup", stopDrag)
+                    props.desktop.current?.removeEventListener("pointermove", onUpdatePosition)
+                    props.desktop.current?.removeEventListener("pointerup", stopDrag)
                 }, 50) // intrdouce a small delay where the user can still drag the window without actually pressing down lmb to prevent accidental drops
             }
         }, [onUpdatePosition]);
@@ -31,9 +31,9 @@ export function Window(props: Window.Props) {
 
                     onStartDrag(e);
                     dragging.value = true
-                    props.desktop.current?.addEventListener("mousemove", onUpdatePosition)
-                    props.desktop.current?.addEventListener("mouseleave", stopDrag, { once: true })
-                    props.desktop.current?.addEventListener("mouseup", stopDrag, { once: true })
+                    props.desktop.current?.addEventListener("pointermove", onUpdatePosition)
+                    props.desktop.current?.addEventListener("pointerleave", stopDrag, { once: true })
+                    props.desktop.current?.addEventListener("pointerup", stopDrag, { once: true })
                 }
             }
         }, [onUpdatePosition, onStartDrag, stopDrag]);
-- 
cgit v1.2.3

