void Drawable::focus(void) { UGui* g = UGui::instance(); if (g->_focus_drawable) g->_focus_drawable->focus_out(); g->_focus_drawable = this; focus_in(); //postEvent(FOCUS_EVENT); }
void handle_event(xcb_generic_event_t *evt) { uint8_t resp_type = XCB_EVENT_RESPONSE_TYPE(evt); switch (resp_type) { case XCB_MAP_REQUEST: map_request(evt); break; case XCB_DESTROY_NOTIFY: destroy_notify(evt); break; case XCB_UNMAP_NOTIFY: unmap_notify(evt); break; case XCB_CLIENT_MESSAGE: client_message(evt); break; case XCB_CONFIGURE_REQUEST: configure_request(evt); break; case XCB_PROPERTY_NOTIFY: property_notify(evt); break; case XCB_ENTER_NOTIFY: enter_notify(evt); break; case XCB_MOTION_NOTIFY: motion_notify(evt); break; case XCB_FOCUS_IN: focus_in(evt); break; case 0: process_error(evt); break; default: if (randr && resp_type == randr_base + XCB_RANDR_SCREEN_CHANGE_NOTIFY) { update_monitors(); } break; } }