From ef03fde8448fb60fd92b6d94d2f16b72f7a20062 Mon Sep 17 00:00:00 2001 From: MissinLinkk05551 Date: Wed, 5 Aug 2026 13:14:58 -0500 Subject: [PATCH] Fix menu positioning on monitors with negative coordinates --- src/dll/src/ContextMenu.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/dll/src/ContextMenu.cpp b/src/dll/src/ContextMenu.cpp index e7239da0..a6589057 100644 --- a/src/dll/src/ContextMenu.cpp +++ b/src/dll/src/ContextMenu.cpp @@ -4934,8 +4934,8 @@ namespace Nilesoft long x = rect.left + (rect.width() / 2) - (size.cx / 2); long y = rect.top - size.cy - ctx->dpi(10); - if(x < 0) x = 0; - if(y < 0) y = rect.bottom + ctx->dpi(10); + if(x < ctx->_rcMonitor.left) x = ctx->_rcMonitor.left; + if(y < ctx->_rcMonitor.top) y = rect.bottom + ctx->dpi(10); if((x + size.cx) > ctx->_rcMonitor.right) x = ctx->_rcMonitor.right - size.cx; @@ -5819,13 +5819,13 @@ namespace Nilesoft if(wnd->has_scroll) { - wp->y = (ctx->_rcMonitor.height() - wnd->height) / 2; + wp->y = ctx->_rcMonitor.top + ((ctx->_rcMonitor.height() - wnd->height) / 2); } else if((wnd->height + 100) > (ctx->_rcMonitor.height() / 2)) { //wp->y -= 50; } - else if((wp->y + wnd->height) > (ctx->_rcMonitor.height() - ctx->dpi(40))) + else if((wp->y + wnd->height) > (ctx->_rcMonitor.bottom - ctx->dpi(40))) { //wp->y -= ctx->dpi(40); //wp->y /= 2;