The handling of WM_CHANGECBCHAIN is invalid, its up to the application to pass this message further to next window if it wasn't a message for self. Then WM_CHANGECBCHAIN is handled it should always return 0, which is not the case, the code path ends up in DefWindowProcw() which give an undefined behaviour.
Created attachment 533 [details] Path which fix the correct behavior.
Created attachment 546 [details] Fixes 2 identified problems with clipboard monitoring.
There is also a third problem; Every window that is created is hooking up the clipboard monitoring, even if the fltk application didn't registered a clipboard notification handler. We shouldn't do that due to the flaky clipboard monitoring API.
Created attachment 549 [details] Complete patch that fixes 3 problems with clipboard monitoring on windows platform. Updated patch that fixes the three identified problems.
Patch commited to buildsystem in 29023.
This patch is incomplete. If you unregister all handlers it will fail to unregister from Windows as the untarget function always tries to find a new window to register.
Fixed in r29477 (and upstream). Not possible to test unfortunately as vncviewer doesn't stumble upon this bug.
(In reply to comment #7) > Fixed in r29477 (and upstream). Not possible to test unfortunately as vncviewer > doesn't stumble upon this bug. Fair enough, closing then.