vcl/win/window/salframe.cxx |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

New commits:
commit 3d8951fa1c7fe30632d4e8151a4a54af2e3befc0
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Thu Mar 14 23:01:43 2024 +0500
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Thu Mar 14 21:56:27 2024 +0100

    Convert an assert into a warning
    
    Seen in an external script calling XSystemChildFactory::createSystemChild.
    
    Change-Id: Ib0fd8ef395700a22e96551ca39aa0ef6dfb21242
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164842
    Tested-by: Mike Kaganski <mike.kagan...@collabora.com>
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index ab20e2411e42..926694ccbb5b 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -4276,8 +4276,14 @@ static void ImplHandleMoveMsg(HWND hWnd, LPARAM lParam)
 #ifdef NDEBUG
     (void) lParam;
 #endif
-    assert(IsIconic(hWnd) || (pFrame->maGeometry.x() == 
static_cast<sal_Int16>(LOWORD(lParam))));
-    assert(IsIconic(hWnd) || (pFrame->maGeometry.y() == 
static_cast<sal_Int16>(HIWORD(lParam))));
+    SAL_WARN_IF(!IsIconic(hWnd) && pFrame->maGeometry.x() != 
static_cast<sal_Int16>(LOWORD(lParam)),
+                "vcl",
+                "Unexpected X: " << pFrame->maGeometry.x() << " instead of "
+                                 << static_cast<sal_Int16>(LOWORD(lParam)));
+    SAL_WARN_IF(!IsIconic(hWnd) && pFrame->maGeometry.y() != 
static_cast<sal_Int16>(HIWORD(lParam)),
+                "vcl",
+                "Unexpected Y: " << pFrame->maGeometry.y() << " instead of "
+                                 << static_cast<sal_Int16>(HIWORD(lParam)));
 
     if (GetWindowStyle(hWnd) & WS_VISIBLE)
         pFrame->mbDefPos = false;

Reply via email to