Skip to content

Commit 296e729

Browse files
committed
[mono] XenAdmin: MultiSelectTreeView: Disable HScroll manipulation
This hotfix disables the functionality that is a cause of exceptions throwing on Mono runtime. The expected negative impact is the probability to lose the horizontal scroll function somewhere. Signed-off-by: Ilya Stolyarov <[email protected]>
1 parent 91ac3b9 commit 296e729

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

XenAdmin/Controls/TreeViews/MultiSelectTreeView.cs

+12-2
Original file line numberDiff line numberDiff line change
@@ -1088,11 +1088,21 @@ public int HScrollPos
10881088
{
10891089
get
10901090
{
1091-
return ScrollInfo(Win32.ScrollBarConstants.SB_HORZ);
1091+
if (System.Type.GetType("Mono.Runtime") == null)
1092+
{
1093+
return ScrollInfo(Win32.ScrollBarConstants.SB_HORZ);
1094+
}
1095+
else
1096+
{
1097+
return 0;
1098+
}
10921099
}
10931100
set
10941101
{
1095-
Win32.SendMessage(Handle, Win32.WM_HSCROLL, (IntPtr)(((int)Win32.ScrollBarCommands.SB_THUMBPOSITION) | (value << 16)), (IntPtr)0);
1102+
if (System.Type.GetType("Mono.Runtime") == null)
1103+
{
1104+
Win32.SendMessage(Handle, Win32.WM_HSCROLL, (IntPtr)(((int)Win32.ScrollBarCommands.SB_THUMBPOSITION) | (value << 16)), (IntPtr)0);
1105+
}
10961106
}
10971107
}
10981108

0 commit comments

Comments
 (0)