void KeyboardApplet::destroy() { xEventNotifier.stop(); disconnect(&xEventNotifier, SIGNAL(layoutMapChanged()), this, SLOT(layoutChanged())); disconnect(&xEventNotifier, SIGNAL(layoutChanged()), this, SLOT(layoutChanged())); Applet::destroy(); }
bool XEventNotifier::processXkbEvents(XEvent* event) { if( XEventNotifier::isGroupSwitchEvent(event) ) { emit(layoutChanged()); } else if( XEventNotifier::isLayoutSwitchEvent(event) ) { emit(layoutMapChanged()); } return true; }
void KeyboardApplet::init() { Applet::init(); readConfig(); connect(&xEventNotifier, SIGNAL(layoutChanged()), this, SLOT(layoutChanged())); connect(&xEventNotifier, SIGNAL(layoutMapChanged()), this, SLOT(layoutChanged())); xEventNotifier.start(); layoutChanged(); }
bool XEventNotifier::processXkbEvents(xcb_generic_event_t* event) { _xkb_event *xkbevt = reinterpret_cast<_xkb_event *>(event); if( XEventNotifier::isGroupSwitchEvent(xkbevt) ) { // kDebug() << "group switch event"; emit(layoutChanged()); } else if( XEventNotifier::isLayoutSwitchEvent(xkbevt) ) { // kDebug() << "layout switch event"; emit(layoutMapChanged()); } return true; }