bhua8122
2009-Mar-13 22:46 UTC
[Wine] Sending input events to background applications in Win32
Our goal is the create a application sharing system that allows users to drag the applications off-screen into other people's desktops for them to use while maintaining control of the local desktop. Currently we plan to implement it by creating a virtual screen and placing the shared application there. VNC will then be used to stream windows to peers and input will be routed over. The problem I am facing is that Win32 only has one event queue and allows input only to the active window/app. This is a deal breaker as we wanted to send input coming in from the network to a specific, background application on the virtual screen. We have to do this as the active window from the local user's perspective will the the one they are using on there real, physical desktop. I want to write a wrapper for the Win32 DLL(s) and reimplement the window management with multiple event queues/multiple activate windows. I don't need multiple pointers (altough that has been done by CPN Mouse) to achieve this as I just need to route calls like SendInput to the desired background application (clicks, drags, over, up/down and keystrokes). Since Wine is also a (re)implementation of Win32, I was hoping developers here will have some insight on where I should start looking and whether the entire modification is in just 1 DLL, a collection of them or whethere it is even feasible to do such a thing.
vitamin
2009-Mar-13 23:57 UTC
[Wine] Re: Sending input events to background applications in Win32
bhua8122 wrote:> I want to write a wrapper for the Win32 DLL(s) and reimplement the window managementGood luck! You won't get too far with this effort - some parts of it inside kernel. bhua8122 wrote:> The problem I am facing is that Win32 only has one event queue and allows input only to the active window/app.What do you mean one queue? Each thread can have a message queue. And window doesn't have to be active to have focus. All though it's the case in 99.99% cases (otherwise things break). Window management is the most convoluted and broken part of windows where most applications depend on one bug or the other. This is where term "bug is a feature" came from. Wine has lots of issues in that area because ... it does not do window management itself. This is what WM (KDE/Gnome) is for. And they don't always follow the brain-damaged M$ logic.