Invalidation of a RECT

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Invalidation of a RECT

Post by pcmattman »

OK, my Window Manager fro my OS has now been rewritten to use the full power of linked lists. It works nicely so far.

I implemented a 'GiveFocus' function that takes a window under a given point to the front of the screen, but to do so I'm repainting the entire desktop. I know this is really a bad way of doing the repaint, but I'm not sure how much to invalidate... Do I just invalidate the windows that are moving? What area is invalidated?

I also have a problem that when the window is moved to the front, when the mouse is moved the old window draws partly because of the cursor background that I'm saving on each cursor draw (so it can be drawn to the screen again to have a smooth cursor). Any ideas how to stop this?
User avatar
mathematician
Member
Member
Posts: 437
Joined: Fri Dec 15, 2006 5:26 pm
Location: Church Stretton Uk

Post by mathematician »

Why not do what Windows does, and give the job of repainting a window to the program which owns it. Once the repaint is complete you can redraw any part of the cursor which has been obliterated.
Post Reply