#Xlib Rendering rectangle lags behind cursor
17 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.
I tried to chatgpt my problem for help but that didnt really lead me anywhere, currently im at a sort of a stand still
Lagging how?
uhh, rather than the end point of the rectangle being at the cursor, the rectangle is being drawn slower than the cursor moves
the specific function is takeUserInput()
An input lag of a frame or two is normal.
its much more than a frame or 2
lemme see if i can get a quick video of it
it didnt embed bruh
sorry 1 sec
it was a bit worse before using XFlush, but i can't figure out how to fix the problem as a whole
Xlib Rendering rectangle lags behind cursor
Making an event loop in a different program with a simple window has the correct functionality but the problem is that I am clearing the window every time I am redrawing the rectangle. I don't think I can clear the window each time because it would clear the SCREEN_IMAGE that i overlayed onto the overlay_window
currently what I am doing is re-overlaying the image every time and I believe thats my problem but I dont know of another solution to keep the image shown