I destroy one window,just only one;but XSERVER will send five destroynotify to my client;why?
help me !thanks!!
here is my codes:
#if defined(Q_WS_X11)
{
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 Expose:
return true;
case ConfigureNotify:
printf("resize1\n");
return true;
case DestroyNotify:
printf("destroy\n");
return true;
default:
return false;
}
}
#endif
#if defined(Q_WS_X11)
App::App():public QApplication
{
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 Expose:
return true;
case ConfigureNotify:
printf("resize1\n");
return true;
case DestroyNotify:
printf("destroy\n");
return true;
default:
return false;
}
}
#endif
To copy to clipboard, switch view to plain text mode
Added after 4 minutes:
and another question,
when i use QApplication::x11eventfilter(),i find my appwindow cannot redraw itself if some other sub-window cover it,
Added after 13 minutes:
and
When I move my mouse to the GNOME's taskbar ,XSERVER will also create a destroy event ,even if no clicked
Added after 36 minutes:
can u understand what I wanna say?
my english is not very well for i am chinese;
Bookmarks