From b8e7590f06daf0b5a7f96a0a440a5796d3d3c732 Mon Sep 17 00:00:00 2001
From: rswindell <>
Date: Fri, 9 Jul 2004 03:25:07 +0000
Subject: [PATCH] WIN_EXTKEYS mode flag is required for ulist to return
 negative values for extended keys.

---
 src/uifc/uifc.h   | 4 ++--
 src/uifc/uifc32.c | 6 ++++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/uifc/uifc.h b/src/uifc/uifc.h
index 9ee575ebd6..284374c041 100644
--- a/src/uifc/uifc.h
+++ b/src/uifc/uifc.h
@@ -8,7 +8,7 @@
  * @format.tab-size 4		(Plain Text/Source Code File Header)			*
  * @format.use-tabs true	(see http://www.synchro.net/ptsc_hdr.html)		*
  *																			*
- * Copyright 2003 Rob Swindell - http://www.synchro.net/copyright.html		*
+ * Copyright 2004 Rob Swindell - http://www.synchro.net/copyright.html		*
  *																			*
  * This library is free software; you can redistribute it and/or			*
  * modify it under the terms of the GNU Lesser General Public License		*
@@ -131,7 +131,7 @@
 	#define MSK_DEL 	0x20000000
 	#define MSK_GET 	0x30000000
 	#define MSK_PUT 	0x40000000
-	/* Dont forget, negative return values are used for extended keys! */
+	/* Dont forget, negative return values are used for extended keys (if WIN_EXTKEYS used)! */
 #else
 	#define MAX_OPTS	500 	/* Maximum number of options per menu call */
 	#define MSK_ON		0xf000
diff --git a/src/uifc/uifc32.c b/src/uifc/uifc32.c
index f9d661aab3..5b6c5e267d 100644
--- a/src/uifc/uifc32.c
+++ b/src/uifc/uifc32.c
@@ -8,7 +8,7 @@
  * @format.tab-size 4		(Plain Text/Source Code File Header)			*
  * @format.use-tabs true	(see http://www.synchro.net/ptsc_hdr.html)		*
  *																			*
- * Copyright 2003 Rob Swindell - http://www.synchro.net/copyright.html		*
+ * Copyright 2004 Rob Swindell - http://www.synchro.net/copyright.html		*
  *																			*
  * This library is free software; you can redistribute it and/or			*
  * modify it under the terms of the GNU Lesser General Public License		*
@@ -1402,7 +1402,9 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
 						}
 						break;
 					default:
-						return(-2-i);
+						if(mode&WIN_EXTKEYS)
+							return(-2-i);
+						break;
 				} 
 			}
 			else {
-- 
GitLab