1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +02:00

Merge pull request #889 from bttelle/hover-multi-monitor

Fix HoverWatch handling of multiple-monitors
This commit is contained in:
Brian Fiete 2021-02-03 04:04:26 -08:00 committed by GitHub
commit e5de60c87f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1221,13 +1221,19 @@ namespace IDE.ui
int workspaceY;
int workspaceWidth;
int workspaceHeight;
BFApp.sApp.GetWorkspaceRectFrom((.)listView.mRequestPos.Value.x, (.)listView.mRequestPos.Value.y, 1, 1, out workspaceX, out workspaceY, out workspaceWidth, out workspaceHeight);
float popupX = listView.mRequestPos.Value.x;
float popupY = listView.mRequestPos.Value.y;
int screenX = (int)popupX + (int)mOrigScreenX;
int maxWidth = workspaceWidth - screenX - GS!(8);
// GetWorkspaceRectFrom expects virtual screen coordinates
int screenX = (.)(popupX + mOrigScreenX);
int screenY = (.)(popupY + mOrigScreenY);
BFApp.sApp.GetWorkspaceRectFrom(screenX, screenY, 1, 1,
out workspaceX, out workspaceY, out workspaceWidth, out workspaceHeight);
int maxWidth = workspaceWidth - screenX + workspaceX - GS!(8);
if (mTextPanel != null)
{
maxWidth = Math.Min(maxWidth, mTextPanel.mWidgetWindow.mWindowWidth);