本文整理汇总了C++中Task::addTransient方法的典型用法代码示例。如果您正苦于以下问题:C++ Task::addTransient方法的具体用法?C++ Task::addTransient怎么用?C++ Task::addTransient使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Task
的用法示例。
在下文中一共展示了Task::addTransient方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: windowAdded
void TaskManager::windowAdded(WId w )
{
NETWinInfo info(qt_xdisplay(), w, qt_xrootwin(),
NET::WMWindowType | NET::WMPid | NET::WMState );
#ifdef KDE_3_2
NET::WindowType windowType = info.windowType(NET_ALL_TYPES_MASK);
#else
NET::WindowType windowType = info.windowType();
#endif
// ignore NET::Tool and other special window types
if (windowType != NET::Normal && windowType != NET::Override
&& windowType != NET::Unknown && windowType != NET::Dialog)
return;
// ignore windows that want to be ignored by the taskbar
if ((info.state() & NET::SkipTaskbar) != 0)
{
_skiptaskbar_windows.push_front( w ); // remember them though
return;
}
Window transient_for_tmp;
if (XGetTransientForHint(qt_xdisplay(), (Window) w, &transient_for_tmp))
{
WId transient_for = (WId) transient_for_tmp;
// check if it's transient for a skiptaskbar window
if (_skiptaskbar_windows.contains(transient_for))
return;
// lets see if this is a transient for an existing task
if (transient_for != qt_xrootwin() && transient_for != 0 )
{
Task* t = findTask(transient_for);
if (t)
{
if (t->window() != w)
{
t->addTransient(w);
// kdDebug() << "TM: Transient " << w << " added for Task: " << t->window() << endl;
}
return;
}
}
}
Task* t = new Task(w, this);
_tasks.append(t);
// kdDebug() << "TM: Task added for WId: " << w << endl;
emit taskAdded(t);
}