Skip to content

Commit

Permalink
[mono] XenAdmin: MultiSelectTreeView: Disable HScroll manipulation
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
ila-embsys committed May 1, 2024
1 parent 91ac3b9 commit 296e729
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions XenAdmin/Controls/TreeViews/MultiSelectTreeView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1088,11 +1088,21 @@ public int HScrollPos
{
get
{
return ScrollInfo(Win32.ScrollBarConstants.SB_HORZ);
if (System.Type.GetType("Mono.Runtime") == null)
{
return ScrollInfo(Win32.ScrollBarConstants.SB_HORZ);
}
else
{
return 0;
}
}
set
{
Win32.SendMessage(Handle, Win32.WM_HSCROLL, (IntPtr)(((int)Win32.ScrollBarCommands.SB_THUMBPOSITION) | (value << 16)), (IntPtr)0);
if (System.Type.GetType("Mono.Runtime") == null)
{
Win32.SendMessage(Handle, Win32.WM_HSCROLL, (IntPtr)(((int)Win32.ScrollBarCommands.SB_THUMBPOSITION) | (value << 16)), (IntPtr)0);
}
}
}

Expand Down

0 comments on commit 296e729

Please sign in to comment.