[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bgsdev::gksnotes

Title:Latest kits: GKS V6.x (see 2535.*), GKS V5.3 (see 2480.*)
Notice:Kits: V6.x -> 2535.*; V5.3 -> 2480.*
Moderator:BGSDEV::CROCKER
Created:Mon Feb 03 1986
Last Modified:Wed May 28 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2734
Total number of notes:9779

2727.0. "Any gotchas with EVENT type locator in ECHO mode?" by SUBPAC::FARICELLI () Fri Mar 28 1997 09:21

   Are their any gotcha's in using locators in event mode with
   echo turned on?

   What I am doing is setting up three locators to catch
   mouse motion, button press 1 and button press 2.
   I call an escape function to put the drawing mode into XOR.
   On each mouse motion event, I draw a GDP elliptical arc
   (to erase the previous arc) and re-draw it, using information on the
   new mouse position. This gives the illusion of an arc that changes
   shape depending on the mouse position.

   If I put the locators in NOECHO mode, everything seems to work fine.
   If I put the locators in ECHO mode, I seem to get a slew of
   events, even if my mouse is not moving. Eventually my workstation
   starts beeping uncontrolllably for a while, even after I have killed
   my application.

   My event loops looks like (modeled after the GKS example codes)

      do while(.TRUE.)
c        Check the event queue
         call gks$await_event(timeout, work_id, class, dev_num)
         if ( class .ne. GKS$K_INPUT_CLASS_NONE ) then
            if ( dev_num .eq. 8 ) then
               ... drawe something ...
            else if ( dev_num .eq. 1 ) then
               ... draw something ...
            else if ( dev_num .eq. 5 ) then
               ... draw something ...
            endif
         endif
      end do

   I'm pretty satisfied to use NOECHO mode, so that's an OK workaround.
   Is this expected behavior?

   Digital Unix 3.2D, GKS 6.3, Motif workstation.

   -- John Faricelli
T.RTitleUserPersonal
Name
DateLines