diff --git a/AngelLoader/CustomControls/RichTextBoxCustom.cs b/AngelLoader/CustomControls/RichTextBoxCustom.cs index e17a63046..4e089ba44 100644 --- a/AngelLoader/CustomControls/RichTextBoxCustom.cs +++ b/AngelLoader/CustomControls/RichTextBoxCustom.cs @@ -437,9 +437,23 @@ protected override void WndProc(ref Message m) { switch ((uint)m.Msg) { + // Intercept the mousewheel call and direct direct it to use the fixed scrolling case InteropMisc.WM_MOUSEWHEEL: InterceptMousewheel(ref m); break; + // Fix the flickering that is present when reader mode is entered + case InteropMisc.WM_MBUTTONDOWN: + this.SetStyle(ControlStyles.Selectable, false); + DefWndProc(ref m); + break; + case InteropMisc.WM_MBUTTONUP: + this.SetStyle(ControlStyles.Selectable, false); + DefWndProc(ref m); + break; + case InteropMisc.WM_MBUTTONDBLCLK: + this.SetStyle(ControlStyles.Selectable, false); + DefWndProc(ref m); + break; // The below DefWndProc() call essentially "calls" this section, and this section "returns" whether // the cursor was over a link (via LinkCursor) case InteropMisc.WM_REFLECT + InteropMisc.WM_NOTIFY: