mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2026-03-13 09:24:25 +08:00
Try to fix
bug #1850003 "DB treeview context menu opens only on first monitor" and bug #1846610 "Database View/List Popup Menu position issue" Although I can't test the solution completely as I'm lacking a second monitor (like the reporter of the first bug), it seems correct that TPopupMenu.Popup() needs the clientorigin added to the mousepoint which is only a relative position to the underlying TWinControl. @see TMDIChild.btnDataClick()
This commit is contained in:
@@ -1520,7 +1520,7 @@ procedure TMDIChild.DBtreeContextPopup(Sender: TObject; MousePos: TPoint;
|
||||
begin
|
||||
debug('context menu; storing right click item so it won''t get lost');
|
||||
DBRightClickSelectedItem := DBtree.Selected;
|
||||
popupTreeView.Popup(MousePos.X, MousePos.Y);
|
||||
popupTreeView.Popup(DBtree.ClientOrigin.X + MousePos.X, DBtree.ClientOrigin.Y + MousePos.Y);
|
||||
PostMessage(MainForm.Handle, WM_CLEAR_RIGHTCLICK_POINTER, 0, 0);
|
||||
end;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user