I noticed something strange in MorphOS LCL, I made a little Painting program in LCL. When the mouse moves over the image and the window is not active it works as expected (coordinate and pixel color) but when clicked into the Painting area or the window is active it becomes very slow and the mouse pointer stops.
I made some tests and noticed the difference is that the main painting region gets repainted and there it becomes slow, but its not the drawing routine self.
The drawing works at the moment in this (buffered) way:
- MUIM_Draw – Event appears
- MUI_AddClipping – set a Clipping
- Create a new Buffer RastPort
- Create a Bitmap (AllocBitmap) for the Buffer Rastport, with width and height of the drawing area, Depth from the MUI rastport (from Renderinfo), BMF_MINPLANES or BMF_CLEAR and the bitmap of the MUI rastports Bitmap as Friend Bitmap
- ClipBlit of the MUI Rastport to the Buffer Rastport
- Drawing of the LCL things to the Buffer Rastport
- ClipBlit of the Buffer Rastport to the MUI RastPort
- Destroy Buffer Rastport and Bitmap
- Remove Clipping
- Leave Draw Event
If I remove the Buffering, so draw directly onto the MUI RastPort it stays fast and the mouse pointer makes no problems. When the program starts this stuttering mouse pointer is maybe related to it also? I noticed also other programs have this stuttering mouse on start (OWB for example). I still have no idea why.