Commit 73522293 authored by Fjen Undso's avatar Fjen Undso
Browse files

fix mouse drag on touchscreens

parent f290a135
......@@ -160,9 +160,14 @@ class NCHL:
# mouse
if k == "KEY_MOUSE":
_, mx, my, _, _ = curses.getmouse()
self.logger.info(f"mouse: {mx} {my}")
self.fs_main.send_mouse(mx, my)
try:
_, mx, my, _, _ = curses.getmouse()
except curses.error:
pass
else:
self.logger.info(f"mouse: {mx} {my}")
self.fs_main.send_mouse(mx, my)
continue
# send key to main window
self.fs_main.send_key(k)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment