int count = 0;
int index = 0;
- if (!subsystem || !subsystem->server || !subsystem->server->clients)
- return -1;
+ if (!subsystem || !subsystem->server || !subsystem->server->clients)
+ return -1;
templateMsg.xPos = subsystem->pointerX;
templateMsg.yPos = subsystem->pointerY;
templateMsg.Free = x11_shadow_message_free;
-
server = subsystem->server;
ArrayList_Lock(server->clients);
monitor->flags = 1;
}
+ errno = 0;
return numMonitors;
}
extensions = XListExtensions(subsystem->display, &nextensions);
if (!extensions || (nextensions < 0))
- return -1;
+ return -1;
for (i = 0; i < nextensions; i++)
{
subsystem->cursorMaxWidth = 256;
subsystem->cursorMaxHeight = 256;
subsystem->cursorPixels = _aligned_malloc(subsystem->cursorMaxWidth *
- subsystem->cursorMaxHeight * 4, 16);
+ subsystem->cursorMaxHeight * 4, 16);
if (!subsystem->cursorPixels)
return -1;
if (subsystem->use_xfixes)
{
if (x11_shadow_xfixes_init(subsystem) < 0)
- subsystem->use_xfixes = FALSE;
+ subsystem->use_xfixes = FALSE;
}
if (subsystem->use_xinerama)
{
if (x11_shadow_xinerama_init(subsystem) < 0)
- subsystem->use_xinerama = FALSE;
+ subsystem->use_xinerama = FALSE;
}
if (subsystem->use_xshm)
{
if (x11_shadow_xshm_init(subsystem) < 0)
- subsystem->use_xshm = FALSE;
+ subsystem->use_xshm = FALSE;
}
if (subsystem->use_xdamage)
{
if (x11_shadow_xdamage_init(subsystem) < 0)
- subsystem->use_xdamage = FALSE;
+ subsystem->use_xdamage = FALSE;
}
if (!(subsystem->event = CreateFileDescriptorEvent(NULL, FALSE, FALSE,
- subsystem->xfds, WINPR_FD_READ)))
+ subsystem->xfds, WINPR_FD_READ)))
return -1;
virtualScreen = &(subsystem->virtualScreen);
static int x11_shadow_subsystem_uninit(rdpShadowSubsystem* sub)
{
- x11ShadowSubsystem* subsystem = (x11ShadowSubsystem*)sub;
+ x11ShadowSubsystem* subsystem = (x11ShadowSubsystem*)sub;
if (!subsystem)
return -1;
static int x11_shadow_subsystem_start(rdpShadowSubsystem* sub)
{
- x11ShadowSubsystem* subsystem = (x11ShadowSubsystem*)sub;
+ x11ShadowSubsystem* subsystem = (x11ShadowSubsystem*)sub;
- if (!subsystem)
- return -1;
+ if (!subsystem)
+ return -1;
if (!(subsystem->thread = CreateThread(NULL, 0,
(LPTHREAD_START_ROUTINE) x11_shadow_subsystem_thread,
static int x11_shadow_subsystem_stop(rdpShadowSubsystem* sub)
{
- x11ShadowSubsystem* subsystem = (x11ShadowSubsystem*)sub;
+ x11ShadowSubsystem* subsystem = (x11ShadowSubsystem*)sub;
- if (!subsystem)
- return -1;
+ if (!subsystem)
+ return -1;
if (subsystem->thread)
{
subsystem->Authenticate = (pfnShadowAuthenticate) x11_shadow_pam_authenticate;
#endif
subsystem->SynchronizeEvent = (pfnShadowSynchronizeEvent)
- x11_shadow_input_synchronize_event;
+ x11_shadow_input_synchronize_event;
subsystem->KeyboardEvent = (pfnShadowKeyboardEvent)
- x11_shadow_input_keyboard_event;
+ x11_shadow_input_keyboard_event;
subsystem->UnicodeKeyboardEvent = (pfnShadowUnicodeKeyboardEvent)
- x11_shadow_input_unicode_keyboard_event;
+ x11_shadow_input_unicode_keyboard_event;
subsystem->MouseEvent = (pfnShadowMouseEvent) x11_shadow_input_mouse_event;
subsystem->ExtendedMouseEvent = (pfnShadowExtendedMouseEvent)
- x11_shadow_input_extended_mouse_event;
+ x11_shadow_input_extended_mouse_event;
subsystem->composite = FALSE;
subsystem->use_xshm = FALSE; /* temporarily disabled */
subsystem->use_xfixes = TRUE;
FREERDP_API int X11_ShadowSubsystemEntry(RDP_SHADOW_ENTRY_POINTS* pEntryPoints)
{
- if (!pEntryPoints)
- return -1;
+ if (!pEntryPoints)
+ return -1;
pEntryPoints->New = x11_shadow_subsystem_new;
pEntryPoints->Free = x11_shadow_subsystem_free;