U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » Mouse Interaction with UI causes Paint to not function
Re: Mouse Interaction with UI causes Paint to not function [message #60041 is a reply to message #60036] Fri, 14 July 2023 17:32 Go to previous message
devilsclaw is currently offline  devilsclaw
Messages: 76
Registered: August 2022
Member
Dual Window may not be required but its how I got it to happen.

I have a GUI app what has a Window that then starts another main window with custom drawing. from now one first window is main window and the second window is sub window.

in the main window code it does a job that causes the sub window to show a progress bar which is custom drawn. this job is in it own thread and uses EnterGuiMutex and LeaveGuiMutex. the thread will loop and call fresh when things change.

In this setup it causes performance problems and even allowing the mouse to enter and move around will cause the painting to stop rendering new images.

I found that if I use std::this_thread::sleep_for(std::chrono::milliseconds(2)); in the thread which allow it to loose context. This allow everything to work fine.

Just figured I will let people fined out what I found out. That ended up being the solution for me.
 
Read Message
Read Message
Read Message
Previous Topic: BufferPainter Clip Crash - Fatal error: Invalid memory access!
Next Topic: Font and Image rendering slow
Goto Forum:
  


Current Time: Fri May 29 18:21:21 GMT+2 2026

Total time taken to generate the page: 0.00822 seconds