Changeset 36750
- Timestamp:
- May 14, 2014, 10:33:30 AM (12 years ago)
- Location:
- branches/eam_branches/ipp-20140423/Ohana/src
- Files:
-
- 4 edited
-
kapa2/src/EventLoop.c (modified) (3 diffs)
-
kapa2/src/FlushDisplay.c (modified) (1 diff)
-
kapa2/src/Refresh.c (modified) (1 diff)
-
opihi/dvo/coordmosaic.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20140423/Ohana/src/kapa2/src/EventLoop.c
r21153 r36750 1 1 # include "Ximage.h" 2 # define DEBUG 0 2 3 3 4 /* list events being selected below, all other masks are ignored */ … … 6 7 int LastEvent (Display *display, int type, XEvent *event) { 7 8 8 int found ;9 int found, Nfound; 9 10 10 11 found = FALSE; 12 Nfound = 0; 11 13 while (XCheckTypedEvent (display, type, event)) { 14 // If the link is slow, then I should wait a little while for some config events to 15 // build up (typically, the window is being dragged around, so we get a whole series of 16 // config events. the flush / sync time is slow on a slow link, so we should try to wait 17 // for the config events to stop, but on a timescale deteremined by the flush/sync time 18 // if (type == ConfigureNotify) fprintf (stderr, "config (%d)\n", Nfound); 19 Nfound ++; 12 20 found = TRUE; 21 } 22 if (DEBUG && found) { 23 if (type == ConfigureNotify) fprintf (stderr, "config (%d)\n", Nfound); 24 if (type == CirculateNotify) fprintf (stderr, "circul (%d)\n", Nfound); 25 if (type == Expose) fprintf (stderr, "expose (%d)\n", Nfound); 26 } 27 28 // if I have a ConfigureNotify event, I should purge all Expose events as well: 29 if (found && (type == ConfigureNotify)) { 30 XEvent discard; 31 while (XCheckTypedEvent (display, Expose, &discard)); 13 32 } 14 33 return (found); … … 38 57 39 58 if (XEventsQueued (display, QueuedAfterFlush) < 1) { 40 /* fprintf (stderr, "."); */41 59 usleep (50000); 42 60 continue; 43 61 } 44 62 63 // If I have a config event, I want to also purge all expose events 64 45 65 /* grab the last entry for these events */ 46 if (LastEvent (display, ConfigureNotify, &event)) Reconfig (&event);47 if (LastEvent (display, CirculateNotify, &event)) Reconfig (&event);48 if (LastEvent (display, Expose, &event)) Refresh ();66 if (LastEvent (display, ConfigureNotify, &event)) { Reconfig (&event); continue; } 67 if (LastEvent (display, CirculateNotify, &event)) { Reconfig (&event); continue; } 68 if (LastEvent (display, Expose, &event)) { Refresh (); continue; } 49 69 if (LastEvent (display, MappingNotify, &event)) XRefreshKeyboardMapping ((XMappingEvent *) &event); 50 70 if (LastEvent (display, MotionNotify, &event)) UpdatePointer (graphic, (XMotionEvent *) &event); -
branches/eam_branches/ipp-20140423/Ohana/src/kapa2/src/FlushDisplay.c
r21153 r36750 30 30 31 31 if (flush) { 32 XFlush (graphic->display); 32 // I changed XFlush to XSync to avoid lag 33 // of the display (build up of config events) 34 XSync (graphic->display, FALSE); 33 35 reftime = now; 34 36 } -
branches/eam_branches/ipp-20140423/Ohana/src/kapa2/src/Refresh.c
r27790 r36750 47 47 Y0 = graphic[0].dy - graphic[0].dy * section[0].y - dY; 48 48 X0 = graphic[0].dx * section[0].x; 49 // fprintf (stderr, "section: (%s) %d %d - %d %d\n", section[0].name, X0, Y0, dX, dY);50 49 51 50 XFillRectangle (graphic[0].display, graphic[0].window, graphic[0].gc, X0, Y0, dX, dY); -
branches/eam_branches/ipp-20140423/Ohana/src/opihi/dvo/coordmosaic.c
r36739 r36750 174 174 double fx = ix * dX - 0.5*NX; // coordinate in full image 175 175 176 double Lo, Lm , dL;177 double Mo, Mm , dM;176 double Lo, Lm; //, dL; 177 double Mo, Mm; //, dM; 178 178 179 179 XY_to_LM (&Lo, &Mo, fx, fy, &coords); 180 180 XY_to_LM (&Lm, &Mm, fx, fy, &linear); 181 dL = Lo - Lm;182 dM = Mo - Mm;181 // dL = Lo - Lm; 182 // dM = Mo - Mm; 183 183 184 184 // vX[ix + iy*Nx] += dL;
Note:
See TracChangeset
for help on using the changeset viewer.
