|
From: Steven G. J. <st...@gi...> - 2000-08-26 10:43:00
|
David Nunes wrote:
> I am trying to use the -wdpy option with Vis5d 5.2 under AIX 4.3. It does
> not seem to work for me, however. Below is what I am trying and what I get.
The following patch below fixes the bug, which was really obvious once I
found the line of code causing the crash:
Index: src/api.c
===================================================================
RCS file: /cvsroot/vis5d/vis5d/src/api.c,v
retrieving revision 1.4
diff -u -r1.4 api.c
--- src/api.c 2000/08/06 07:07:27 1.4
+++ src/api.c 2000/08/26 08:21:22
@@ -9839,7 +9839,7 @@
{
Cursor cursor;
- cursor = XCreateFontCursor (GfxDpy, shape);
+ cursor = XCreateFontCursor (dpy, shape);
XDefineCursor (dpy, win, cursor);
XFreeCursor (dpy, cursor);
return 1;
However, once I fixed this, I noticed that something else was strange with
-wdpy. The sounding window was appearing when the program launched, on
the same screen as the 3d display, instead of being initially
hidden. Worse, clicking on the "Sounding" button caused Vis5d to crash.
Anyway, I tracked down the problems, which are fixed by the below
additional patch. Everything seems to work now.
(I'll be releasing a Vis5d+ 1.0.2 one of these days with the fixes.)
Cordially,
Steven G. Johnson
===================================================================
RCS file: /cvsroot/vis5d/vis5d/src/api.c,v
retrieving revision 1.5
diff -u -r1.5 api.c
--- api.c 2000/08/26 08:26:13 1.5
+++ api.c 2000/08/26 09:42:18
@@ -3044,7 +3044,8 @@
XSynchronize(SndDpy, 1);
if (dtx->Sound.SoundCtrlWindow){
- XMapWindow( SndDpy, dtx->Sound.SoundCtrlWindow);
+ extern Display *GuiDpy;
+ XMapWindow( GuiDpy, dtx->Sound.SoundCtrlWindow);
}
XMapWindow( SndDpy, dtx->Sound.soundwin);
XSynchronize(SndDpy, 0);
@@ -3056,11 +3057,10 @@
DPY_CONTEXT("vis5d_map_sndwindow");
if (dtx->Sound.SoundCtrlWindow){
- XUnmapWindow( SndDpy, dtx->Sound.SoundCtrlWindow);
+ extern Display *GuiDpy;
+ XUnmapWindow( GuiDpy, dtx->Sound.SoundCtrlWindow);
}
- else{
- XMapWindow( SndDpy, dtx->Sound.soundwin);
- }
+ XUnmapWindow( SndDpy, dtx->Sound.soundwin);
return 0;
}
/* MJK 12.10.98 end */
Index: sounding.c
===================================================================
RCS file: /cvsroot/vis5d/vis5d/src/sounding.c,v
retrieving revision 1.3
diff -u -r1.3 sounding.c
--- sounding.c 2000/08/24 06:55:23 1.3
+++ sounding.c 2000/08/26 09:42:18
@@ -651,11 +651,6 @@
}
do_pixmap_art(dtx);
- /* MJK 12.15.98 */
- if (dtx->Sound.SoundCtrlWindow != 0){
- XMapWindow(SndDpy, dtx->Sound.soundwin);
- }
-
return 1;
}
|