QApplication::x11EventFilter()帮忙看看这段代码有什么错误!!!谢!!!!!!
App::App(int argc, char**argv): QApplication(argc, argv){
display=QX11Info::display();// XOpenDisplay("0:0");
if (display == NULL)
{
printf("Cannot connect to X server " );
exit (-1);
};
XSelectInput(display,QX11Info::appRootWindow(QX11Info::appScreen()),SubstructureNotifyMask);
}
bool App::x11EventFilter(XEvent *xe)
{
switch (xe->type)
{
case ConfigureNotify:
printf("resize1\n");
return true;
case DestroyNotify:
printf("destroy\n");
return true;
default:
return false;
}
}
#endif
在QApplication里面设置了X11的事件过滤器;发现两个问题,
一个是关闭一个窗口,却传回5个DestroyNotify:
一个进程被阻塞,拖动窗口的大小时,窗口改变的那部分大小没法显示出来
补充:移动开发 , Qt