]> granicus.if.org Git - nethack/commitdiff
X11: Disable menucolors when showing text files
authorPasi Kallinen <paxed@alt.org>
Fri, 30 Nov 2018 13:26:38 +0000 (15:26 +0200)
committerPasi Kallinen <paxed@alt.org>
Fri, 30 Nov 2018 13:26:38 +0000 (15:26 +0200)
include/winX.h
win/X11/winX.c
win/X11/winmenu.c

index 1a061fa14ded07da8545dd5870d758031ff2f904..a1a56052815168694e23f9315d6247818587e855 100644 (file)
@@ -165,6 +165,7 @@ struct menu_info_t {
     boolean cancelled; /* Menu has been explicitly cancelled. */
     boolean counting;  /* true when menu_count has a valid value */
     boolean permi;
+    boolean disable_mcolors; /* disable menucolors */
 
     int permi_x, permi_y; /* perm_invent window x,y */
     int permi_w, permi_h; /* perm_invent window wid, hei */
index 7337e6f04eb79fb83d5df3f7e08117ecd5b913fd..09d5c7a5077dddfd4450bd5f581d3aa733b619d3 100644 (file)
@@ -1962,6 +1962,7 @@ boolean complain;
         wp->title = dupstr(str);
 
     wp->menu_information->permi = FALSE;
+    wp->menu_information->disable_mcolors = TRUE;
     (void) X11_select_menu(newwin, PICK_NONE, &menu_list);
     X11_destroy_nhwindow(newwin);
 }
index 04d75e77f79baa4a8cc8169165a619342cb817a9..7ac8d2491ca673173680e840ca12fd28a3df7092 100644 (file)
@@ -1162,7 +1162,7 @@ struct menu *curr_menu;
         XtSetArg(args[num_args], nhStr(XtNborderWidth), 0); num_args++;
         XtSetArg(args[num_args], nhStr(XtNvertDistance), 0); num_args++;
 
-        if (!iflags.use_menu_color
+        if (!iflags.use_menu_color || wp->menu_information->disable_mcolors
             || !get_menu_coloring(curr->str, &color, &attr))
             attr = curr->attr;