[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#378779: xmessage -default ignores -print



Control: tags -1 patch
Control: found -1 x11-utils/7.7+2
thanks

Still present in jessie. Attached patch should fix it.
>From f4ef2e191e39c7a2de5902d761e4103dfa571074 Mon Sep 17 00:00:00 2001
From: "Yuriy M. Kaminskiy" <yumkam@gmail.com>
Date: Wed, 20 Apr 2016 03:51:46 +0300
Subject: [PATCH] xmessage: -default ignores -print

Debian bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=378779
---
 xmessage.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/xmessage.c b/xmessage.c
index 6f31007..d7ff0f9 100644
--- a/xmessage.c
+++ b/xmessage.c
@@ -150,7 +150,11 @@ default_exit_action(Widget w, XEvent *event, String *params,
     Cardinal *num_params)
 {
     if (default_exitstatus >= 0)
+      {
+        if (qres.default_button != NULL && qres.print_value)
+          puts(qres.default_button);
 	exit(default_exitstatus);
+      }
 }
 
 /* Convert tabs to spaces in *messagep,*lengthp, copying to a new block of
-- 
2.1.4


Reply to: