Page 1 of 1

Invalidation of a RECT

Posted: Mon Jun 11, 2007 3:55 pm
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?

Posted: Mon Jun 11, 2007 6:05 pm
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.