On Wed, 20 May 2009, James Rich wrote:
But no matter. Following your steps of hightlight -> Edit -> Copy ->
middle click causes x5250 to crash for me, so at last I can reproduce the
problem. Now to find a solution...
And here it is:
--- x5250-0.5.2-pre4/src/x5250.c 2005-11-11 14:13:18.000000000
-0700
+++ x5250/src/x5250.c 2009-05-20 15:27:21.598297303 -0600
@@ -1451,7 +1451,7 @@
{
Tn5250Window *windowlist, *subwindow;
Atom type_returned;
- int format_returned;
+ int format_returned = 0;
unsigned long items_returned;
unsigned long bytes_remaining;
unsigned char *data;
@@ -1463,10 +1463,10 @@
items_returned = 1024;
bytes_remaining = 0;
- if (XGetWindowProperty
+ if ((XGetWindowProperty
(display, win, property, 0, items_returned, True, AnyPropertyType,
&type_returned, &format_returned, &items_returned,
&bytes_remaining,
- &data) == Success)
+ &data) == Success) && (items_returned > 0))
{
#ifdef DEBUG
fprintf (stderr, "got the selection:\n[%s]\n", data);
--- x5250-0.5.2-pre4/src/x5250term.c 2006-01-09 17:06:29.000000000
-0700
+++ x5250/src/x5250term.c 2007-01-29 13:59:06.000000000 -0700
@@ -2190,9 +2190,30 @@
}
#endif
+ /* For some reason terminal->data->row does not contain the right
values
+ * when pasting on some screens. So ignore terminal->data->row and
just
+ * row all the time.
+ * FIXME
+ */
+ /*
+ if (terminal->data->row != row)
+ {
+ printf ("row != terminal->data->row! (%d %d)\n",
+ row, terminal->data->row);
+ }
+ if (terminal->data->column != column)
+ {
+ printf ("column != terminal->data->column! (%d %d)\n",
+ column, terminal->data->column);
+ }
+
if (is_in_field (terminal->data->row - windowrowoffset,
terminal->data->column - windowcolumnoffset,
&terminal->data->fieldid))
+ */
+ if (is_in_field (row - windowrowoffset,
+ column - windowcolumnoffset,
+ &terminal->data->fieldid))
{
c = key;
James Rich
if you want to understand why that is, there are many good books on
the design of operating systems. please pass them along to redmond
when you're done reading them :)
- Paul Davis on ardour-dev
As an Amazon Associate we earn from qualifying purchases.