Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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: 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.
 
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: Wed Apr 30 05:06:06 CEST 2025

Total time taken to generate the page: 0.04025 seconds