void Kernel::handleMotionNotify(XMotionEvent *event) { Menu *menu = menuWindow(event->window); if (menu) { menu->handleMotionNotify(event); } Bar *bar = barWindow(event->window); if (bar) { bar->handleMotionNotify(event); return; } Thing *thing = thingWindow(event->window); if (thing) { if (!thing->isFocused() && isSloppyMode_) { Workspace *workspace = focusedMonitor()->focused(); workspace->focus(thing, false); } thing->handleMotionNotify(event); } // focusses the monitor if multihead isRootWindow(event->root); }
int mainwindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QWidget::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: menuWindow(); break; case 1: creditwindow(); break; case 2: mgc(); break; case 3: e(); break; case 4: helpwindow(); break; default: ; } _id -= 5; } return _id; }
bool Kernel::isNCWMWindow(Window window) { return isRootWindow(window) || #ifdef SLOT_SUPPORT slotWindow(window) || #endif // SLOT_SUPPORT menuWindow(window) || barWindow(window) || boxWindow(window) || thingWindow(window); }
void Kernel::handleButtonPress(XButtonEvent *event) { event->state &= Binder::instance()->validModMask(); if (event->state != 0) { // no AnyModifier, so this seems to be shortcut Binder::instance()->handleButton(event->root, event); return; } Menu *menu = menuWindow(event->window); if (menu) { menu->handleButtonPress(event); return; } Bar *bar = barWindow(event->window); if (bar) { bar->handleButtonPress(event); return; } #ifdef SLOT_SUPPORT Slot *slot = slotWindow(event->window); if (slot) { slot->handleButtonPress(event); return; } #endif Thing *thing = thingWindow(event->window); if (thing) { thing->handleButtonPress(event); } Client *client = clientForWindow(event->window); if (client) { client->handleButtonPress(event); } }