Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
97 user(s) are online (79 user(s) are browsing Forums)

Members: 0
Guests: 97

more...

Support us!

Headlines

 
  Register To Post  

Moving mouse slows down animation
Just can't stay away
Just can't stay away


See User information
I'm fighting a particularly vicious bug in Qt: In the animated tiles example, when moving mouse, animation jerks/stops. It is really puzzling me because:

1) Disabling mouse events from intuition doesn't remove the problem (I have tried disabling both MOUSEMOVE, MOUSBUTTONS, ReportMouse, EXTENDEDMOUSE events).

2) Searching for code that reads the MouseX and MouseY variables from screens and windows doesn't turn up anything.

3) Thinking about stuff, that I have changed in the code doesn't give me anything tangible. In particular, turning the "native" stuff off doesn't get rid of the problem.

I'm hoping, that some wise person can enlighten my troubled mind...

Go to top
Re: Moving mouse slows down animation
Just can't stay away
Just can't stay away


See User information
so am i! spit it out you random wize mind!

Go to top
Re: Moving mouse slows down animation
Just can't stay away
Just can't stay away


See User information
@spotUP

Hehe...

Go to top
Re: Moving mouse slows down animation
Amigans Defender
Amigans Defender


See User information
Quote:

alfkil wrote:

1) Disabling mouse events from intuition doesn't remove the problem (I have tried disabling both MOUSEMOVE, MOUSBUTTONS, ReportMouse, EXTENDEDMOUSE events).


I'm not that much of an Intuition expert but I'll have a guess.

"Disabling mouse events" actually means disabling the reporting of mouse events to your application window's IDCMP port. But the events still get reported to Intuition (otherwise things like Workbench couldn't work), so there's always some system overhead associated with the use of the mouse. Plus, the mouse pointer is no longer drawn by a special hardware circuit (as it used to be on the original Amiga). So perhaps the graphic subsystem gets strained too much in the context of your application, causing jerkiness?

The Rear Window blog

AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon RX 560 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
Go to top
Re: Moving mouse slows down animation
Just can't stay away
Just can't stay away


See User information
@trixie

The problem is, that it used to work fluently. I have just checked with an earlier version of qt (which had luckily survived on my hd), and it shows no problems jerkiness in that perticular example.

I guess I will have to roll back my changes and reimplement everything to see, if I can track down the bug that way. What a drag...

Go to top
Re: Moving mouse slows down animation
Home away from home
Home away from home


See User information
@Alfkil

Does this occur all the time? or only when your window is active?


Go to top
Re: Moving mouse slows down animation
Just can't stay away
Just can't stay away


See User information
@broadblues

All the time.

And yes, I did figure it out at last: When asking for screen dimensions, I used a seemingly very time expensive call to LockPubScreen. Apparently this one example is calling QDesktopWidget::screenDimensions all the time, and this caused the slowness. It is still a bit strange, though, that it only slows down when the mouse is moving, but hey.

Instead I just buffer the screen dims at entry, and woopie, the slowness is gone. Great...

Go to top
Re: Moving mouse slows down animation
Just can't stay away
Just can't stay away


See User information
@alfkil

haha! and you are all cool about it.. :D
congrats for finding it so quick!

Go to top
Re: Moving mouse slows down animation
Just can't stay away
Just can't stay away


See User information
@spotUP

Hehe, spot, you are a sport!

Go to top
Re: Moving mouse slows down animation
Just popping in
Just popping in


See User information
Maybe its not so strange at all... LockPubScreen() locks the screen bitmap, and it does so even for Intuition. If Intuition tries to draw the mouse pointer, it is blocked for the time you hold the lock to the screen.

I dont know much about internal workings, but it seems to me that Intuition (due to its higher priority) first redraws the mouse pointer (and traverses the display refresh lists) before it gives control back to your code.

For Intuition screens its not very wise to get the screen dimensions repeatedly, as long as your program has control over this particular screen. It wont close or change dimensions until you tell Intuition to do so

Maybe some cache mechanism would do the trick, but this might be not as portable as it should be, as most GUI systems lack certain Intuition features...

Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project