[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Mouse polling?



Hallo everybody,

  some users of mint111 might have noticed already that CoNnect does run
very unstable in this environment. In fact if you use the mouse to select
a certain text region the system will hang as soon as you release the
left mouse button.

  I myself currently feel one hundred percent not guilty and managed to
reproduce the bug outside connect. I compiled the following code (PureC1.1)
with mint030.prg (mint111) executing execmtos. gem.sys is the 4.1 version
of 8/5/93. There are no other programs running and no accessories installed.
The machine is a TT030/4/4 running TOS3.06.

-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----
#include <stdio.h>
#include <aes.h>

main() {
  int mx,my,mb,ms;
  
  /* --- say hallo to aes --- */

  appl_init();			

  /* --- don't show any social behaviour --- */

  wind_update(BEG_UPDATE);
  wind_update(BEG_MCTRL);

  /* --- but show the text cursor --- */
  graf_mouse(M_ON,0);	       
  graf_mouse(TEXT_CRSR,0);	


  /* --- now we require user action: press the left button, please --- */
  evnt_button( 1, 1, 1, &mx, &my, &mb, &ms);

  /* --- here the mouse polling starts --- */
  do {
    evnt_timer(50,0);

    /* --- here we enter nirvana as the user releases the button --- */
    /* --- after dragging - i.e. moving the move around while --- */
    /* --- keeping button 1 pressed --- */
    graf_mkstate( &mx, &my, &mb, &ms);
  } while( mb & 1);

  /* --- in case we use MagiC we will arrive here ;-) --- */
  graf_mouse(ARROW,0);
  graf_mouse(M_OFF,0);
  wind_update(END_MCTRL);
  wind_update(END_UPDATE);
  appl_exit();
  return 0;
}
-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----

Together with the latest GEM.SYS which was sent to some developpers a long
while ago, mint111 even crashes the system on the desktop when selecting
a desktop region and releasing the mouse button.

Is this problem known and are there solutions (apart from installing
linux 68k) ? ;-)

      Wolfgang