changeset 64488:e71cc2adddad

* lwlib-Xm.c (make_menu_in_widget): Disable drag and drop for labels in menu bar.
author Jan Djärv <jan.h.d@swipnet.se>
date Tue, 19 Jul 2005 09:06:47 +0000
parents c9a7bffa9534
children 86ac75fb6283
files lwlib/ChangeLog lwlib/lwlib-Xm.c
diffstat 2 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lwlib/ChangeLog	Tue Jul 19 08:54:45 2005 +0000
+++ b/lwlib/ChangeLog	Tue Jul 19 09:06:47 2005 +0000
@@ -1,3 +1,8 @@
+2005-07-19  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>
+
+	* lwlib-Xm.c (make_menu_in_widget): Disable drag and drop for 
+	labels in menu bar.
+
 2005-07-04  Lute Kamstra  <lute@gnu.org>
 
 	Update FSF's address in GPL notices.
--- a/lwlib/lwlib-Xm.c	Tue Jul 19 08:54:45 2005 +0000
+++ b/lwlib/lwlib-Xm.c	Tue Jul 19 09:06:47 2005 +0000
@@ -524,6 +524,10 @@
   Widget* old_children;
   unsigned int old_num_children;
 
+  /* Disable drag and drop for labels in menu bar.  */
+  static char overrideTrans[] = "<Btn2Down>: Noop()";
+  XtTranslations override = XtParseTranslationTable (overrideTrans);
+
   old_children = XtCompositeChildren (widget, &old_num_children);
 
   /* Allocate the children array */
@@ -632,6 +636,8 @@
 
 	  XtAddCallback (button, XmNcascadingCallback, xm_pull_down_callback,
 			 (XtPointer)instance);
+          XtOverrideTranslations (button, override);
+
 	}
 
       children[child_index] = button;