From 8fa73f993816ebedd8b584aa0ace8eb0b44706a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AB=8F=E8=A8=AA=E5=AD=90?= Date: Sun, 3 May 2026 19:30:31 +0900 Subject: [PATCH] =?UTF-8?q?Windows=E3=81=A7=E3=82=B3=E3=83=B3=E3=83=91?= =?UTF-8?q?=E3=82=A4=E3=83=AB=E3=82=A8=E3=83=A9=E3=83=BC=E3=81=AE=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hexeditor.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/hexeditor.cc b/src/hexeditor.cc index 8086b25..a9215c9 100644 --- a/src/hexeditor.cc +++ b/src/hexeditor.cc @@ -763,12 +763,22 @@ void HexEditor::handleReplace() { } void HexEditor::handleMouse() { +#ifdef _WIN32 + if (getmouse() == 0) return; + + int mx = Mouse_status.x; + int my = Mouse_status.y; + + if (!(Mouse_status.button[0] & BUTTON1_PRESSED) + || (Mouse_status.changes & 0x01)) return; +#else MEVENT event; if (getmouse(&event) != OK) return; if (!(event.bstate & BUTTON1_PRESSED)) return; int mx = event.x; int my = event.y; +#endif if (my == 0 || my == rows - 1) return; if (my >= 1 && my < rows - 2 && mx < cols / 2) {