本文整理汇总了C++中kwin::WindowInfo::name方法的典型用法代码示例。如果您正苦于以下问题:C++ WindowInfo::name方法的具体用法?C++ WindowInfo::name怎么用?C++ WindowInfo::name使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kwin::WindowInfo
的用法示例。
在下文中一共展示了WindowInfo::name方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
bool RKWardApplication::x11EventFilter (XEvent *e) {
if (detect_x11_creations) {
if (e->type == CreateNotify) {
if (e->xcreatewindow.parent == qt_xrootwin ()) {
KWin::WindowInfo info = KWin::windowInfo (e->xcreatewindow.window);
// at this point, we used to check, whether this window has some name or another. This heuristic allowed to sieve out helper windows of the window manager. However, since R 2.8.0, sometimes the window is mapped, before it has been give a name.
// Now we rely on the fact (we hope it *is* a fact), that the device window is always the first one created.
if ((info.windowType (0xFFFF) != 0) && (!created_window)) {
created_window = e->xcreatewindow.window;
return true;
}
} else {
RK_ASSERT (false);
}
}
}
if (e->type == PropertyNotify) {
if (e->xproperty.atom == wm_name_property) {
if (name_watchers_list.contains (e->xproperty.window)) {
KWin::WindowInfo wininfo = KWin::windowInfo (e->xproperty.window);
name_watchers_list[e->xproperty.window]->setCaption (wininfo.name ());
return true;
}
}
}
return KApplication::x11EventFilter (e);
}