server = subsystem->server;
surface = server->surface;
+ subsystem->lastMouseClient = client;
x += surface->x;
y += surface->y;
server = subsystem->server;
surface = server->surface;
+ subsystem->lastMouseClient = client;
x += surface->x;
y += surface->y;
{
SHADOW_MSG_OUT_POINTER_POSITION_UPDATE* msg;
UINT32 msgId = SHADOW_MSG_OUT_POINTER_POSITION_UPDATE_ID;
+ rdpShadowClient* client;
+ rdpShadowServer* server;
+ int count = 0;
+ int index = 0;
msg = (SHADOW_MSG_OUT_POINTER_POSITION_UPDATE*) calloc(1, sizeof(SHADOW_MSG_OUT_POINTER_POSITION_UPDATE));
msg->yPos = subsystem->pointerY;
msg->Free = x11_shadow_message_free;
- return shadow_client_boardcast_msg(subsystem->server, NULL, msgId, (SHADOW_MSG_OUT*) msg, NULL) ? 1 : -1;
+ server = subsystem->server;
+
+ ArrayList_Lock(server->clients);
+ for (index = 0; index < ArrayList_Count(server->clients); index++)
+ {
+ client = (rdpShadowClient*)ArrayList_GetItem(server->clients, index);
+
+ /* Skip the client which send us the latest mouse event */
+ if (client == subsystem->lastMouseClient)
+ continue;
+
+ if (shadow_client_post_msg(client, NULL, msgId, (SHADOW_MSG_OUT*) msg, NULL))
+ count++;
+ }
+ ArrayList_Unlock(server->clients);
+
+ return count;
}
int x11_shadow_pointer_alpha_update(x11ShadowSubsystem* subsystem)