Myen's patch wasn't applied because it used the map template, and I
wanted to write a solution using linked lists (as you've done).
A few additional notes:
WndProc is the subclassed window procedure for current window. That
means that every message the window gets is passed through this
procedure before it's handled anywhere else. Calling find_FS on
every iteration of this proc is VERY inefficent, and would probably
add a noticeable slowdown. Since we're really only interested in 3
messages, I've moved the that call to after the message check, so
it'll only be called when we need it.
I fixed up remove_FS, so it can be used at any time (instead of just
removing all the items at once). As it was, it would set root=NULL
if the first entry was deleted, while we would really want it to set
In answer to your questions:
1) Add WM_CLOSE handling to the subclassed window (I addeded this to
2) We pretend this isn't there :)
Thanks for the patch,
On 22 Jun 2002 at 16:42, Ulf Erikson wrote:
> According to the Bug Tracking System there was a patch sent in by Myen
> at 11/30/01 for bug #2. Still the bug is marked as "open" with "high
> priority". Checking out the CVS the bug is still there.. I can't find
> no comment why that patch never got included. Is it accepted but not
> Here is my attempt anyway. With two issues:
> 1) memory consumption: For each window brought into full screen is a
> small amount of memory allocated. Currently this is only freed when
> the application terminates. If there is a way for a plugin to be
> notified when a window is destroyed this is easily fixed.
> 2) concurrent access: This is a multithreaded application, yet all
> access to global variables is (in every plugin i have looked at)
> done without any kind of process synchronization. I didn't add that.
> Again, some parts of the patch are to please mingw/gcc. Just revert
> the lines your compiler barf at. Sorry about that.