void vncPrepareInputDevices(void) { /* * Not ideal since these callbacks do not stack, but it's the only * decent way we can reliably catch events for both the slave and * master device. */ mieqSetHandler(ET_KeyPress, vncXkbProcessDeviceEvent); mieqSetHandler(ET_KeyRelease, vncXkbProcessDeviceEvent); }
Bool DarwinEQInit(void) { int *p; for (p = darwin_x11_modifier_mask_list; *p; p++) { darwin_x11_modifier_mask |= *p; } darwin_all_modifier_mask = darwin_x11_modifier_mask; for (p = darwin_all_modifier_mask_additions; *p; p++) { darwin_all_modifier_mask |= *p; } mieqInit(); mieqSetHandler(ET_XQuartz, DarwinEventHandler); /* Note that this *could* cause a potential async issue, since we're checking * darwinEvents without holding the lock, but darwinEvents is only ever set * here, so I don't bother. */ if (!darwinEvents) { darwinEvents = InitEventList(GetMaximumEventsNum()); if (!darwinEvents) FatalError("Couldn't allocate event buffer\n"); darwinEvents_lock(); pthread_cond_broadcast(&mieq_ready_cond); darwinEvents_unlock(); } if (!fd_add_tid) fd_add_tid = create_thread(DarwinProcessFDAdditionQueue_thread, NULL); return TRUE; }
void QuartzModeEQInit(void) { mieqSetHandler(kXquartzWindowState, xprEventHandler); mieqSetHandler(kXquartzWindowMoved, xprEventHandler); mieqSetHandler(kXquartzBringAllToFront, xprEventHandler); }