BOOL xf_event_process(freerdp* instance, XEvent* event) { BOOL status = TRUE; xfAppWindow* appWindow; xfContext* xfc = (xfContext*) instance->context; if (xfc->remote_app) { appWindow = xf_AppWindowFromX11Window(xfc, event->xany.window); if (appWindow) { /* Update "current" window for cursor change orders */ xfc->appWindow = appWindow; if (xf_event_suppress_events(xfc, appWindow, event)) return TRUE; } } xf_event_execute_action_script(xfc, event); if (event->type != MotionNotify) DEBUG_X11("%s Event(%d): wnd=0x%08lX", X11_EVENT_STRINGS[event->type], event->type, (unsigned long) event->xany.window); switch (event->type) { case Expose: status = xf_event_Expose(xfc, event, xfc->remote_app); break; case VisibilityNotify: status = xf_event_VisibilityNotify(xfc, event, xfc->remote_app); break; case MotionNotify: status = xf_event_MotionNotify(xfc, event, xfc->remote_app); break; case ButtonPress: status = xf_event_ButtonPress(xfc, event, xfc->remote_app); break; case ButtonRelease: status = xf_event_ButtonRelease(xfc, event, xfc->remote_app); break; case KeyPress: status = xf_event_KeyPress(xfc, event, xfc->remote_app); break; case KeyRelease: status = xf_event_KeyRelease(xfc, event, xfc->remote_app); break; case FocusIn: status = xf_event_FocusIn(xfc, event, xfc->remote_app); break; case FocusOut: status = xf_event_FocusOut(xfc, event, xfc->remote_app); break; case EnterNotify: status = xf_event_EnterNotify(xfc, event, xfc->remote_app); break; case LeaveNotify: status = xf_event_LeaveNotify(xfc, event, xfc->remote_app); break; case NoExpose: break; case GraphicsExpose: break; case ConfigureNotify: status = xf_event_ConfigureNotify(xfc, event, xfc->remote_app); break; case MapNotify: status = xf_event_MapNotify(xfc, event, xfc->remote_app); break; case UnmapNotify: status = xf_event_UnmapNotify(xfc, event, xfc->remote_app); break; case ReparentNotify: break; case MappingNotify: status = xf_event_MappingNotify(xfc, event, xfc->remote_app); break; case ClientMessage: status = xf_event_ClientMessage(xfc, event, xfc->remote_app); break; case PropertyNotify: status = xf_event_PropertyNotify(xfc, event, xfc->remote_app); break; } if (!xfc->remote_app) { xf_cliprdr_handle_xevent(xfc, event); } xf_input_handle_event(xfc, event); XSync(xfc->display, FALSE); return status; }
BOOL xf_event_process(freerdp* instance, XEvent* event) { BOOL status = TRUE; rdpWindow* window; xfContext* xfc = (xfContext*) instance->context; rdpRail* rail = ((rdpContext*) xfc)->rail; if (xfc->remote_app) { window = window_list_get_by_extra_id(rail->list, (void*) event->xexpose.window); if (window) { /* Update "current" window for cursor change orders */ xfc->window = (xfWindow*) window->extra; if (xf_event_suppress_events(xfc, window, event)) return TRUE; } } xf_event_execute_action_script(xfc, event); if (event->type != MotionNotify) DEBUG_X11("%s Event(%d): wnd=0x%04X", X11_EVENT_STRINGS[event->type], event->type, (UINT32) event->xany.window); switch (event->type) { case Expose: status = xf_event_Expose(xfc, event, xfc->remote_app); break; case VisibilityNotify: status = xf_event_VisibilityNotify(xfc, event, xfc->remote_app); break; case MotionNotify: status = xf_event_MotionNotify(xfc, event, xfc->remote_app); break; case ButtonPress: status = xf_event_ButtonPress(xfc, event, xfc->remote_app); break; case ButtonRelease: status = xf_event_ButtonRelease(xfc, event, xfc->remote_app); break; case KeyPress: status = xf_event_KeyPress(xfc, event, xfc->remote_app); break; case KeyRelease: status = xf_event_KeyRelease(xfc, event, xfc->remote_app); break; case FocusIn: status = xf_event_FocusIn(xfc, event, xfc->remote_app); break; case FocusOut: status = xf_event_FocusOut(xfc, event, xfc->remote_app); break; case EnterNotify: status = xf_event_EnterNotify(xfc, event, xfc->remote_app); break; case LeaveNotify: status = xf_event_LeaveNotify(xfc, event, xfc->remote_app); break; case NoExpose: break; case GraphicsExpose: break; case ConfigureNotify: status = xf_event_ConfigureNotify(xfc, event, xfc->remote_app); break; case MapNotify: status = xf_event_MapNotify(xfc, event, xfc->remote_app); break; case UnmapNotify: status = xf_event_UnmapNotify(xfc, event, xfc->remote_app); break; case ReparentNotify: break; case MappingNotify: status = xf_event_MappingNotify(xfc, event, xfc->remote_app); break; case ClientMessage: status = xf_event_ClientMessage(xfc, event, xfc->remote_app); break; case PropertyNotify: status = xf_event_PropertyNotify(xfc, event, xfc->remote_app); break; } if (!xfc->remote_app) { xf_cliprdr_handle_xevent(xfc, event); } xf_input_handle_event(xfc, event); XSync(xfc->display, FALSE); return status; }