First, a thousand thanks to ripsaw for tackling this problem.
I built my custom solution with this patch applied, and had mixed results, unfortunately. All of these notes apply to a custom build based on SVN with output=openglhq, and running DOSBox in a window under Windows XP.
Running a text-based program in what the program calls "Paradise VGA Plus 132x43 16 color mode," the mouse refuses to go into the first line of text, and sometimes won't scroll above the fifth or sixth line of text.
Running the same program in a custom 43-line x 80-character mode that I built into my project (it uses standard size VGA fonts, but in 43 lines instead of 25), again the mouse won't go into the upper few lines of the screen.
Running the same program in graphic mode with the program's VESA driver, at 1024x768, the mouse usually won't go into the right-hand two-thirds of the window. When I do somehow manage to get it into the right-hand part of the window, and click the mouse, the click gets passed to the window behind the DOSBox window, which comes to the front - with, weirdly, the mouse cursor from the DOS app still visible, though it now doesn't do anything. (I hope this is clear.)
Even more weirdly, these results are not entirely repeatable. Sometimes the mouse can get into the right-hand third, and sometimes it can't. I can't make head or tail of this, but it resembles what I experienced before the patch.
I hope this is of some use in sorting this out.