本文整理汇总了C++中BScreen::isScreenManaged方法的典型用法代码示例。如果您正苦于以下问题:C++ BScreen::isScreenManaged方法的具体用法?C++ BScreen::isScreenManaged怎么用?C++ BScreen::isScreenManaged使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BScreen
的用法示例。
在下文中一共展示了BScreen::isScreenManaged方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: fprintf
Blackbox::Blackbox(char **m_argv, const char *dpy_name,
const std::string& rc, bool multi_head)
: bt::Application(m_argv[0], dpy_name, multi_head),
grab_count(0u), _resource(rc)
{
if (! XSupportsLocale())
fprintf(stderr, _("X server does not support locale\n"));
if (XSetLocaleModifiers("") == NULL)
fprintf(stderr, _("cannot set locale modifiers\n"));
argv = m_argv;
active_screen = 0;
focused_window = (BlackboxWindow *) 0;
_ewmh = (bt::EWMH*) 0;
init_icccm();
if (! multi_head || display().screenCount() == 1)
screen_list_count = 1;
else
screen_list_count = display().screenCount();
_resource.load(*this);
screen_list = new BScreen*[screen_list_count];
unsigned int managed = 0;
for (unsigned int i = 0; i < screen_list_count; ++i) {
BScreen *screen = new BScreen(this, i);
if (! screen->isScreenManaged()) {
delete screen;
continue;
}
screen_list[i] = screen;
++managed;
}
if (managed == 0) {
fprintf(stderr, _("%s: no manageable screens found, exiting...\n"),
applicationName().c_str());
::exit(3);
}
screen_list_count = managed;
// start with the first managed screen as the active screen
setActiveScreen(screen_list[0]);
XSynchronize(XDisplay(), false);
XSync(XDisplay(), false);
timer = new bt::Timer(this, this);
timer->setTimeout(0l);
}