diff --git a/uppsrc/CtrlCore/GtkWnd.cpp b/uppsrc/CtrlCore/GtkWnd.cpp index 52c470d95..36b6ebbe8 100644 --- a/uppsrc/CtrlCore/GtkWnd.cpp +++ b/uppsrc/CtrlCore/GtkWnd.cpp @@ -175,9 +175,7 @@ Rect Ctrl::GetWndScreenRect() const return Null; - DTIMING("GetWndScreenRect"); - - if(utop->sync_rect) { + if(utop->sync_rect || 1) { _DBG_ gint x, y; gint width, height; @@ -512,6 +510,7 @@ bool Ctrl::SweepConfigure(bool wait) Rect rect = e.value; DLOG("SweepConfigure " << rect); DDUMP(GetWndScreenRect()); + DDUMP(rect); if(GetRect() != rect) SetWndRect(rect); r = true; @@ -537,7 +536,8 @@ void Ctrl::WndSetPos(const Rect& rect) return; SetWndRect(rect); - if(TopWindow *tw = dynamic_cast(this)) + TopWindow *tw = dynamic_cast(this); + if(tw) tw->SyncSizeHints(); if(top && utop->csd) { Rect m = CSDMargins(); @@ -546,10 +546,13 @@ void Ctrl::WndSetPos(const Rect& rect) LSCH(rect.GetHeight()) + m.top + m.bottom); } else { - Rect m = GetFrameMargins(); + Rect m(0, 0, 0, 0); + if(tw) + m = GetFrameMargins(); gdk_window_move_resize(gdk(), LSC(rect.left - m.left), LSC(rect.top - m.top), LSCH(rect.GetWidth()), LSCH(rect.GetHeight())); } + utop->sync_rect = true; LLOG("-- WndSetPos0 " << rect); } diff --git a/uppsrc/CtrlLib/CtrlUtil.cpp b/uppsrc/CtrlLib/CtrlUtil.cpp index 800be5ccb..6d44b4d33 100644 --- a/uppsrc/CtrlLib/CtrlUtil.cpp +++ b/uppsrc/CtrlLib/CtrlUtil.cpp @@ -48,6 +48,7 @@ void Animate(Ctrl& c, const Rect& target, int type) } c.SetRect(target); c.SetAlpha(255); + DDUMP(target); } void Animate(Ctrl& c, int x, int y, int cx, int cy, int type) diff --git a/uppsrc/CtrlLib/MenuBar.cpp b/uppsrc/CtrlLib/MenuBar.cpp index ab56f2e82..d5d76feac 100644 --- a/uppsrc/CtrlLib/MenuBar.cpp +++ b/uppsrc/CtrlLib/MenuBar.cpp @@ -595,10 +595,12 @@ void MenuBar::PopUp(Ctrl *owner, Point p, Size rsz) CloseHandle(CreateThread(NULL, 0, PlaySoundThread, NULL, 0, &dummy)); #endif doeffect = true; + DLOG("===================== MENU POPUP"); Ctrl::PopUp(owner, true, true, GUI_DropShadows(), !owner); GuiPlatformAfterMenuPopUp(); if(eff) Animate(*this, p.x, p.y, sz.cx, sz.cy); + DDUMP(GetScreenRect()); sz = GetSize(); // final size can be a bit bigger, e.g. in macos pane.RightPos(0, sz.cx).BottomPos(0, sz.cy); }