home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.windows.x
- Path: sparky!uunet!cs.utexas.edu!hermes.chpc.utexas.edu!news.utdallas.edu!corpgate!bnrgate!bnr.co.uk!bmdhh243!bcars267!spock
- From: spock@bnr.ca (Spock)
- Subject: XRN with OSF/MOTIF 1.2.1
- Message-ID: <1993Jan22.223528.12980@bnr.ca>
- Sender: news@bnr.ca (usenet)
- Nntp-Posting-Host: wipeout
- Organization: Bell-Northern Research, Ontario, Canada
- Date: Fri, 22 Jan 1993 22:35:28 GMT
- Lines: 164
-
- Hi,
-
- If you don't use the motif version of xrn its time to skip to the
- next article.
-
- It seems that a minor change between Motif 1.2.0 and 1.2.1 causes
- a segv when scrolling an article. The new version of Motif tries
- to dereference through the "event" passed to XtCallActionProc().
-
- To cure this, I just passed a valid event pointer instead of "0".
-
- The following context diff should be applied on top of xrn6-17 at
- patch level 2. It is backward compatible to any release of Motif.
-
- I have sent this patch to 'xrn@ic.berkeley.edu', and with any luck
- it will appear soon as official patch #3.
-
- Enjoy,
- R
-
- ---------------------------------------------------------------------
-
- *** xrn6-17/buttons.c Fri Jan 22 17:06:26 1993
- --- xrn/buttons.c Fri Jan 22 16:33:12 1993
- ***************
- *** 4197,4206 ****
- * called when the user wants to scroll the current article
- */
- {
- if (Mode != ARTICLE_MODE) {
- return;
- }
- ! XtCallActionProc(ArticleText, "next-page", 0, 0, 0);
- return;
- }
-
- --- 4197,4209 ----
- * called when the user wants to scroll the current article
- */
- {
- + XEvent event;
- +
- if (Mode != ARTICLE_MODE) {
- return;
- }
- ! bzero( (char *) &event, sizeof( XEvent ) );
- ! XtCallActionProc(ArticleText, "next-page", &event, 0, 0);
- return;
- }
-
- ***************
- *** 4213,4222 ****
- * called when the user wants to scroll the current article
- */
- {
- if (Mode != ARTICLE_MODE) {
- return;
- }
- ! XtCallActionProc(ArticleText, "previous-page", 0, 0, 0);
- return;
- }
-
- --- 4216,4228 ----
- * called when the user wants to scroll the current article
- */
- {
- + XEvent event;
- +
- if (Mode != ARTICLE_MODE) {
- return;
- }
- ! bzero( (char *) &event, sizeof( XEvent ) );
- ! XtCallActionProc(ArticleText, "previous-page", &event, 0, 0);
- return;
- }
-
- ***************
- *** 4229,4238 ****
- * called when the user wants to scroll the current article
- */
- {
- if (Mode != ARTICLE_MODE) {
- return;
- }
- ! XtCallActionProc(ArticleText, "scroll-one-line-up", 0, 0, 0);
- return;
- }
-
- --- 4235,4247 ----
- * called when the user wants to scroll the current article
- */
- {
- + XEvent event;
- +
- if (Mode != ARTICLE_MODE) {
- return;
- }
- ! bzero( (char *) &event, sizeof( XEvent ) );
- ! XtCallActionProc(ArticleText, "scroll-one-line-up", &event, 0, 0);
- return;
- }
-
- ***************
- *** 4245,4254 ****
- * called when the user wants to scroll the current article
- */
- {
- if (Mode != ARTICLE_MODE) {
- return;
- }
- ! XtCallActionProc(ArticleText, "scroll-one-line-down", 0, 0, 0);
- return;
- }
-
- --- 4254,4266 ----
- * called when the user wants to scroll the current article
- */
- {
- + XEvent event;
- +
- if (Mode != ARTICLE_MODE) {
- return;
- }
- ! bzero( (char *) &event, sizeof( XEvent ) );
- ! XtCallActionProc(ArticleText, "scroll-one-line-down", &event, 0, 0);
- return;
- }
-
- ***************
- *** 4261,4266 ****
- --- 4273,4280 ----
- * called when the user wants to scroll the current article
- */
- {
- + XEvent event;
- +
- if (Mode != ARTICLE_MODE) {
- return;
- }
- ***************
- *** 4274,4280 ****
-
- data = XmTextGetString(ArticleText);
- XmTextShowPosition(ArticleText, strlen(data)-1);
- ! XtCallActionProc(ArticleText, "scroll-one-line-up", 0, 0, 0);
- XtFree(data);
- }
- #endif
- --- 4288,4295 ----
-
- data = XmTextGetString(ArticleText);
- XmTextShowPosition(ArticleText, strlen(data)-1);
- ! bzero( (char *) &event, sizeof( XEvent ) );
- ! XtCallActionProc(ArticleText, "scroll-one-line-up", &event, 0, 0);
- XtFree(data);
- }
- #endif
-
- ---------------------------------------------------------------------
-
- --
- "At least I'm not wasting my life as a nameless,
- faceless droid in some software megafactory..."
- - anonymous
-