void window_list::handlePropertyNotify(XPropertyEvent* event) { if (event->window == QX11Info::appRootWindow()) { // Windows list changed ............................... if (event->atom == XfitMan::atom("_NET_CLIENT_LIST")) { refreshTaskList(); return; } // Activate window .................................... if (event->atom == XfitMan::atom("_NET_ACTIVE_WINDOW")) { activeWindowChanged(); return; } // Desktop switch ..................................... if (event->atom == XfitMan::atom("_NET_CURRENT_DESKTOP")) { if (this->onlyShowCurrentDesktop) refreshTaskList(); return; } } else { InstanceOfWindow* btn = buttonByWindow(event->window); if (btn) btn->handlePropertyNotify(event); } this->activeWindowChanged(); }
void RazorTaskBar::activeWindowChanged() { Window window = xfitMan().getActiveAppWindow(); RazorTaskButton* btn = buttonByWindow(window); if (btn) btn->setChecked(true); else RazorTaskButton::unCheckAll(); }
void window_list::activeWindowChanged() { Window window = xfitMan().getActiveAppWindow(); InstanceOfWindow* btn = buttonByWindow(window); if (btn) btn->setChecked(true); /*else InstanceOfWindow::unCheckAll();*/ }
void RazorTaskBar::handlePropertyNotify(XPropertyEvent* event) { if (event->window == mRootWindow) { // Windows list changed ............................... if (event->atom == XfitMan::atom("_NET_CLIENT_LIST")) { refreshTaskList(); return; } // Activate window .................................... if (event->atom == XfitMan::atom("_NET_ACTIVE_WINDOW")) { activeWindowChanged(); return; } // Desktop switch ..................................... if (event->atom == XfitMan::atom("_NET_CURRENT_DESKTOP")) { if (mShowOnlyCurrentDesktopTasks) refreshTaskList(); return; } } else { RazorTaskButton* btn = buttonByWindow(event->window); if (btn) btn->handlePropertyNotify(event); } // char* aname = XGetAtomName(QX11Info::display(), event->atom); // qDebug() << "** XPropertyEvent ********************"; // qDebug() << " atom: 0x" << hex << event->atom // << " (" << (aname ? aname : "Unknown") << ')'; // qDebug() << " window: " << XfitMan::debugWindow(event->window); // qDebug() << " display: " << event->display; // qDebug() << " send_event:" << event->send_event; // qDebug() << " serial: " << event->serial; // qDebug() << " state: " << event->state; // qDebug() << " time: " << event->time; // qDebug(); }