CtrlCore: gtk SetRect Fix improved

git-svn-id: svn://ultimatepp.org/upp/trunk@13583 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2019-09-05 07:46:32 +00:00
parent 016216132a
commit f7a11cc5fd

View file

@ -430,9 +430,9 @@ void Ctrl::WndSetPos(const Rect& rect)
SweepConfigure(false); // Remove any previous GDK_CONFIGURE for this window
if(!this_ || !IsOpen())
return;
// gtk_window_move(gtk(), rect.left, rect.top);
// gtk_window_resize(gtk(), rect.GetWidth(), rect.GetHeight());
Rect m = GetFrameMargins();
Rect m(0, 0, 0, 0);
if(dynamic_cast<TopWindow *>(this))
m = GetFrameMargins();
gdk_window_move_resize(gdk(), rect.left - m.left, rect.top - m.top, rect.GetWidth(), rect.GetHeight());
int t0 = msecs();
do { // Wait up to 500ms for corresponding GDK_CONFIGURE to arrive