[SHELL32] CDefView: Find a reasonable place to show a context menu
authorMark Jansen <mark.jansen@reactos.org>
Mon, 14 Jan 2019 20:49:59 +0000 (21:49 +0100)
committerGiannis Adamopoulos <gadamopoulos@reactos.org>
Tue, 15 Jan 2019 12:34:53 +0000 (14:34 +0200)
commit9ae373a023c2c22f037b1f5ac60b927c89b45859
tree6ab4a4a3c576042493b2dc86e29d1a384d510fff
parentf9e50f5471f0c44848996dcb4596a94b0ce5dd3f
[SHELL32] CDefView: Find a reasonable place to show a context menu
Previously, we would treat the input as unsigned coordinates, this is wrong!
If the coordinates are invalid, we try to find a focused or selected item.
The center of this item is where we'll show the menu.
When there is no item, we default to 0,0
dll/win32/shell32/CDefView.cpp