On Mon, Aug 17, 2020 at 09:24:00PM +0100, Aaron Sloman wrote:
> Waldek,
>
> Thanks very much for looking into the Motif problems.
>
> [Apologies for slow response: I've had some other urgent tasks, deadline
> today! Now done.]
>
> You wrote:
>
> > I have looked at Motif problems, and at least one is fixed
> > now. Let me recall (as Aaron wrote) that the following
> > commands in pop11:
> >
> > uses rc_graphic;
> > rc_start();
> >
> > and clicking on window delete button kills Poplog linked
> > to Motif (should only kill window and Poplog should be
> > running).
> >
> > There are actually a few separate issues releated to this.
> > First, in V16 ATM startup image is really minimal. 'rc_graphic'
> > alone does not install event handler for 'delete window'
> > event. Consequently, we get default toolkit action.
> > In Xt (X toolkit) this action seem to be closing window.
> > In Motif this seem to be killing the whole program.
> >
> > Long ago Aaron wrote that:
> >
> > rc_destroy_widget(rc_window);
> >
> > works correctly. However, in V16, using commands above
> > it fails because 'rc_destroy_widget' is not loaded.
> >
> > To install event handler one needs to load another
> > library. For testing I used the following:
> >
> > uses rc_graphic;
> > uses rclib;
> > uses rc_mousepic;
> > rc_start();
> >
> > With this sequence typically clicking on window delete
> > button did nothing, sometimes it killed Poplog.
> > Also
> >
> > rc_destroy_widget(rc_window);
> >
> > killed Poplog.
> >
> > Problem with 'rc_destroy_widget' was because 'rc_destroy_widget'
> > apparently called Poplog event handler, but handler did not
> > recognize the event and we again got default toolkit
> > behaviour. Debugging this was tedious, because most routines
> > were in startup saved image and debugging printouts or other
> > chenges were only effective after rebuilding saved images.
> >
> > Anyway, event was not recognized because Poplog used wrong
> > declaration of corresponding event structure. This is
> > now fixed in git repo. The same problem appeared using Xt
> > (X toolkit). But because default action in Xt is to
> > kill window, the problem was less visible.
> >
> > Now, 'rc_destroy_widget' works OK: kill window and leaves
> > Poplog running. Still, there is problem with events,
> > most to the time event handler is not called. I was
> > not able to find any regularity...
> >
> > To summarize, one problem (unrecgnized event) is fixed.
>
> I would like to install that in the current version of V16. In principle I
> should work out how to get the latest poplog from the git repo and use it
> to build a new version of the file my download script has been using,
> copied from your website
>
> poplog_base.tar.bz2
>
> do you have a script that built that file using contents of github which I
> could copy and use to get a new version, so that the current install file
>
> http://www.cs.bham.ac.uk/research/projects/poplog/V16/getpoplog.sh
>
> does not need to be rewritten?
>
> That would be very helpful.
>
> Otherwise I am not a github user so if you could provide commands for me to
> create a new version of poplog_base.tar.bz2 I would be very grateful.
>
> I appreciate that you have pointed out that there are remaining obscure
> problems!
Concerning Motif, the fix is a small patch (in attachement).
More generally, there are about 10 changes in repository from
time when poplog_base.tar.bz2 was last updated. I feel that
creating new tarballs for each change is heavy and probably
unnecessary. Also, if new tarballs have new names, then there
is cascade of changes to propagate new name. If name is kept,
then there is risk of confusion with older versions.
I think that there are few issues to be resolved before new
release. In particular, what should go into startup image
and how. V15.65 added several libraries in 'mkstartup'
script. This is problematic because X libraries were added
unconditionally, breaking non-X build. We can add libraries
to 'pop/lib/lib/startup.p', thanks to conditionals this
will work both for X and non-X build. There is still
issue of packages, for testing I find it convenient to
build without packages. But if we add functions from
packages to startup image, then build without package
tree would be impossible.
Personally, for me 'build_all.csh' is a problem: I do not
have csh style shell on machines available to me. I use
sh version, and it works fine for me, but that means that
trying 'getpoplog.sh' I test different thing than other
folks. BTW: '-no-pie' is also problem on ARM (and presumably
on 32-bit Intel processors). I think that simple solution
is possible: main build script (or 'configure' before build)
should try compiling a test program giving '-no-pie' to
compiler. If that works (we can test compiler exit status
from the script), we can use '-no-pie', otherwise we
must omit '-no-pie'. But writing the script is still
on my todo list. And if possible would like to avoid
patching sources for '-no-pie' issue, but that needs some
more work.
Ideally, one should be able to just grab files from Github
and build, but we are not there yet. If you really think
that we should create new tarballs just now, I can create
new version of 'poplog_base.tar.bz2'. But it seems better
to resolve more issues before release.
--
Waldek Hebisch
diff -ru trunk/pop/x/pop/include/xpt_xevent.ph poplog_base2/pop/x/pop/include/xpt_xevent.ph
--- trunk/pop/x/pop/include/xpt_xevent.ph 2019-05-16 00:53:23.000000000 +0000
+++ poplog_base2/pop/x/pop/include/xpt_xevent.ph 2020-08-13 23:25:35.990747765 +0000
@@ -525,7 +525,7 @@
window: XptWindow,
message_type: ulong,
format: int,
- data: byte[20],
+ data: long[5],
},
XMappingEvent {
diff -ru trunk/pop/x/pop/lib/xlib/XEvents.p poplog_base2/pop/x/pop/lib/xlib/XEvents.p
--- trunk/pop/x/pop/lib/xlib/XEvents.p 2019-06-08 18:42:26.000000000 +0000
+++ poplog_base2/pop/x/pop/lib/xlib/XEvents.p 2020-08-13 23:35:38.771666896 +0000
@@ -517,7 +517,7 @@
union {
char b[20];
short s[10];
- int l[5];
+ long l[5];
} data;
} XClientMessageEvent;