On 7/26/19 9:30 PM, Derek Lesho wrote:
+#define RIM_ENABLE_NATIVE_MOUSE_MOVE 0x0800 +#define RIM_ENABLE_NATIVE_MOUSE_PRESS 0x1000
I think you don't need these anymore (and they are deleted in a later patch).
struct thread *thread = device->target ? get_window_thread( device->target ) : NULL;
if (device->target ? (thread != current) : (current->queue->input != desktop->foreground_input))
{
if ( thread )
release_object( thread );
release_object( desktop );
return;
}
if (thread)
release_object( thread );
I think it is a bit convoluted, adding at the end of the function:
done: if (thread) release_object( thread );
and then "goto done;" in the case where the message should be ignored, would be clearer.
Also if target window is specified, the raw input messages should still only be delivered if window is also the foreground window.
Note that there's a RIDEV_INPUTSINK flag that can be set, but in this case the messages will be delivered to background windows with RIM_INPUTSINK wparam instead of RIM_INPUT.
I believe we can ignore windows in background for now, or we should implement the correct behavior with INPUTSINK.