]> granicus.if.org Git - nethack/commitdiff
X11: Allow toggling mouse_support off
authorPasi Kallinen <paxed@alt.org>
Tue, 16 Oct 2018 15:09:50 +0000 (18:09 +0300)
committerPasi Kallinen <paxed@alt.org>
Tue, 16 Oct 2018 15:09:54 +0000 (18:09 +0300)
Prevents accidental mouse clicks on the map.

doc/fixes36.2
win/X11/winX.c
win/X11/winmap.c

index 904ac86c12f1f15c3b04688d407459727b631818..6ccf7414fbf0ac0ea95d6180738532f3a1770dab 100644 (file)
@@ -237,6 +237,7 @@ X11: handle paged menu control keys
 X11: remember perm_invent window geometry
 X11: handle X errors via panic
 X11: don't reuse perm_invent window for picking an object
+X11: obey mouse_support and allow toggling it in game
 
 
 General New Features
index c79376c3585c35dcf1a4bae195ba49f468c174a8..10462c978e33af2f5dc12a6ff1df67f339d979b0 100644 (file)
@@ -1307,6 +1307,7 @@ char **argv;
 
     /* add another option that can be set */
     set_wc_option_mod_status(WC_TILED_MAP, SET_IN_GAME);
+    set_option_mod_status("mouse_support", SET_IN_GAME);
 
     load_default_resources(); /* create default_resource_data[] */
 
index ec5e5fa4a686eb5aa1fe0ace1dfd872443779287..3d5ab1d99a4c743880a551ee75785a65bac59da1 100644 (file)
@@ -1029,6 +1029,9 @@ Cardinal *num_params;
 
     switch (event->type) {
     case ButtonPress:
+        if (!iflags.wc_mouse_support)
+            return;
+
         button = (XButtonEvent *) event;
 #ifdef VERBOSE_INPUT
         printf("button press\n");