mirror of
https://github.com/reactos/reactos.git
synced 2024-12-26 17:14:41 +00:00
[NTUSER] Fix popup menu placement when part way off right edge of screen (#7220)
* Move the popup menu to the right edge of the screen when it is past the screen edge on the right. CORE-19706
This commit is contained in:
parent
e546525eac
commit
9ee30c57fd
1 changed files with 3 additions and 5 deletions
|
@ -2992,16 +2992,14 @@ static BOOL FASTCALL MENU_ShowPopup(PWND pwndOwner, PMENU menu, UINT id, UINT fl
|
|||
/* We are off the right side of the screen */
|
||||
if (x + width > monitor->rcMonitor.right)
|
||||
{
|
||||
if ((x - width) < monitor->rcMonitor.left || x >= monitor->rcMonitor.right)
|
||||
x = monitor->rcMonitor.right - width;
|
||||
else
|
||||
x -= width;
|
||||
/* Position menu at right edge of the screen */
|
||||
x = monitor->rcMonitor.right - width;
|
||||
}
|
||||
|
||||
/* We are off the left side of the screen */
|
||||
if (x < monitor->rcMonitor.left)
|
||||
{
|
||||
/* Position menu at left edge of screen */
|
||||
/* Position menu at left edge of the screen */
|
||||
x = 0;
|
||||
|
||||
if (x < monitor->rcMonitor.left || x >= monitor->rcMonitor.right || bIsPopup)
|
||||
|
|
Loading…
Reference in a new issue