fix bug that program stops if XMoveWindow doesn't generate ConfigureNotify

This commit is contained in:
Jinhao 2018-08-18 07:21:03 +08:00
parent 841fa0812c
commit 9ff6567a03

View File

@ -984,6 +984,15 @@ namespace nana{
nana::detail::platform_scope_guard lock;
if(point{x, y} == window_position(wd))
{
//Returns if the requested position is same with the current position.
//In some X-Server versions/implementations, XMoveWindow() doesn't generate
//a ConfigureNotify if the requested position is same with the current position.
//It causes that x11_wait_for always waiting for the ConfigureNotify.
return;
}
XWindowAttributes attr;
::XGetWindowAttributes(disp, reinterpret_cast<Window>(wd), &attr);
if(attr.map_state == IsUnmapped)