Package: lesstif2
Version: 1:0.95.0-2.1
Severity: normal
Tags: patch

Hi,
after a bit of investigation around #364773 I found out that upstream
fixed this in CVS, patch is attached.

I've also prepared an NMU package, debdiff attached as well.

HTH,
filippo

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (900, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.25.1-mactel (SMP w/2 CPU cores)
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash

Versions of packages lesstif2 depends on:
ii  libc6                     2.7-10         GNU C Library: Shared libraries
ii  libice6                   2:1.0.4-1      X11 Inter-Client Exchange library
ii  libsm6                    2:1.0.3-1+b1   X11 Session Management library
ii  libx11-6                  2:1.0.3-7      X11 client-side library
ii  libxext6                  2:1.0.4-1      X11 miscellaneous extension librar
ii  libxp6                    1:1.0.0.xsf1-1 X Printing Extension (Xprint) clie
ii  libxt6                    1:1.0.5-3      X11 toolkit intrinsics library

lesstif2 recommends no packages.

-- no debconf information
--- a/lib/Xm-2.1/RowColumn.c	2006-04-19 20:42:22.000000000 +0200
+++ b/lib/Xm-2.1/RowColumn.c	2007-09-12 22:35:55.000000000 +0200
@@ -1014,6 +1014,10 @@
 
 }
 
+static void xtWarnCB(String message)
+{
+}
+
 static void
 destroy(Widget w)
 {
@@ -1033,14 +1037,19 @@
 
          if (realpar != NULL)
          {
+             XtErrorHandler old_handler;
              XtRemoveEventHandler(realpar,
                                   ButtonPressMask|ButtonReleaseMask,
                                   False, _XmPopupButtonPressHandler,
                                   (XtPointer)w );
-	     /* Fix a grab problem -- dwilliss */
-	     fprintf(stderr, "XtUngrabButton(%s,%u,%u)\n",
-			     XtName(realpar), RC_PostButton(w), RC_PostModifiers(w));
+             /* Yes this may not be necessary, shut up Xt see:
+                http://sourceforge.net/tracker/index.php?func=detail&aid=1217326&group_id=8596&atid=108596 */
+             old_handler = XtAppSetWarningHandler(
+                                        XtWidgetToApplicationContext(realpar),
+                                        xtWarnCB);
 	     XtUngrabButton(realpar, RC_PostButton(w), RC_PostModifiers(w));
+	     XtAppSetWarningHandler(XtWidgetToApplicationContext(realpar),
+	                            old_handler);
          }
      }
 
diff -u lesstif2-0.95.0/debian/changelog lesstif2-0.95.0/debian/changelog
--- lesstif2-0.95.0/debian/changelog
+++ lesstif2-0.95.0/debian/changelog
@@ -1,3 +1,11 @@
+lesstif2 (1:0.95.0-2.2) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Add debian/patches/040_shutup_xtungrabbutton.diff from upstream CVS to fix
+    noisy XtUngrabButton warnings
+
+ -- Filippo Giunchedi <[EMAIL PROTECTED]>  Tue, 06 May 2008 18:30:39 +0200
+
 lesstif2 (1:0.95.0-2.1) unstable; urgency=low
 
   * Non-maintainer upload per "everlasting BSP" rules.
diff -u lesstif2-0.95.0/debian/patches/series lesstif2-0.95.0/debian/patches/series
--- lesstif2-0.95.0/debian/patches/series
+++ lesstif2-0.95.0/debian/patches/series
@@ -10,0 +11 @@
+040_shutup_xtungrabbutton.diff
only in patch2:
unchanged:
--- lesstif2-0.95.0.orig/debian/patches/040_shutup_xtungrabbutton.diff
+++ lesstif2-0.95.0/debian/patches/040_shutup_xtungrabbutton.diff
@@ -0,0 +1,36 @@
+--- a/lib/Xm-2.1/RowColumn.c	2006-04-19 20:42:22.000000000 +0200
++++ b/lib/Xm-2.1/RowColumn.c	2007-09-12 22:35:55.000000000 +0200
+@@ -1014,6 +1014,10 @@
+ 
+ }
+ 
++static void xtWarnCB(String message)
++{
++}
++
+ static void
+ destroy(Widget w)
+ {
+@@ -1033,14 +1037,19 @@
+ 
+          if (realpar != NULL)
+          {
++             XtErrorHandler old_handler;
+              XtRemoveEventHandler(realpar,
+                                   ButtonPressMask|ButtonReleaseMask,
+                                   False, _XmPopupButtonPressHandler,
+                                   (XtPointer)w );
+-	     /* Fix a grab problem -- dwilliss */
+-	     fprintf(stderr, "XtUngrabButton(%s,%u,%u)\n",
+-			     XtName(realpar), RC_PostButton(w), RC_PostModifiers(w));
++             /* Yes this may not be necessary, shut up Xt see:
++                http://sourceforge.net/tracker/index.php?func=detail&aid=1217326&group_id=8596&atid=108596 */
++             old_handler = XtAppSetWarningHandler(
++                                        XtWidgetToApplicationContext(realpar),
++                                        xtWarnCB);
+ 	     XtUngrabButton(realpar, RC_PostButton(w), RC_PostModifiers(w));
++	     XtAppSetWarningHandler(XtWidgetToApplicationContext(realpar),
++	                            old_handler);
+          }
+      }
+ 

Reply via email to