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  |
devilsclaw
Messages: 72 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.
|
|
|
Goto Forum:
Current Time: Wed Apr 30 04:53:12 CEST 2025
Total time taken to generate the page: 0.00905 seconds
|