Пример #1
0
void KeyboardApplet::destroy()
{
    xEventNotifier.stop();
    disconnect(&xEventNotifier, SIGNAL(layoutMapChanged()), this, SLOT(layoutChanged()));
    disconnect(&xEventNotifier, SIGNAL(layoutChanged()), this, SLOT(layoutChanged()));
    Applet::destroy();
}
Пример #2
0
bool XEventNotifier::processXkbEvents(XEvent* event)
{
	if( XEventNotifier::isGroupSwitchEvent(event) ) {
		emit(layoutChanged());
	}
	else if( XEventNotifier::isLayoutSwitchEvent(event) ) {
		emit(layoutMapChanged());
	}
	return true;
}
Пример #3
0
void KeyboardApplet::init()
{
    Applet::init();

    readConfig();
    connect(&xEventNotifier, SIGNAL(layoutChanged()), this, SLOT(layoutChanged()));
    connect(&xEventNotifier, SIGNAL(layoutMapChanged()), this, SLOT(layoutChanged()));
    xEventNotifier.start();

    layoutChanged();
}
Пример #4
0
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;
}