Skip to content

Commit

Permalink
Address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyKuhne committed Oct 4, 2024
1 parent 50810e5 commit 88d6691
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1195,7 +1195,7 @@ private void PreProcessInput(object sender, PreProcessInputEventArgs e)
}
}
// Only process mouse input that is from our active PresentationSource.
else if ((_inputSource != null) && (rawMouseInputReport.InputSource == _inputSource))
else if ((_inputSource is not null) && (rawMouseInputReport.InputSource == _inputSource))
{
// We need to remember the StylusDevice that generated this input. Use the _tagStylusDevice
// to store this in before we take over the inputReport Device and loose it. Any
Expand Down Expand Up @@ -1440,7 +1440,7 @@ private void PreNotifyInput(object sender, NotifyInputEventArgs e)
}

// Only process mouse input that is from our active presentation source.
if ((_inputSource != null) && (rawMouseInputReport.InputSource == _inputSource))
if ((_inputSource is not null) && (rawMouseInputReport.InputSource == _inputSource))
{
// If the input is reporting mouse deactivation, we need
// to break any capture we may have. Note that we only do
Expand Down Expand Up @@ -1888,7 +1888,7 @@ private void PostProcessInput(object sender, ProcessInputEventArgs e)
RawMouseInputReport rawMouseInputReport = (RawMouseInputReport) inputReportEventArgs.Report;

// Only process mouse input that is from our active visual manager.
if ((_inputSource != null) && (rawMouseInputReport.InputSource == _inputSource))
if ((_inputSource is not null) && (rawMouseInputReport.InputSource == _inputSource))
{
// In general, this is where we promote the non-redundant
// reported actions to our premier events.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ protected override void OnDoWork()
// so that nothing gets lost during marshalling. The cast from Int64 to Int32 below
// should be lossless cast because both COM server and client are expected
// to be of same bitness (they are in the same process).
result.CommHandle = IntPtr.Size == 4 ? new IntPtr((int)commHandle) : new IntPtr(commHandle);
result.CommHandle = Environment.Is64BitProcess ? (nint)commHandle : (int)commHandle;

result.WispContextKey = MS.Win32.Penimc.UnsafeNativeMethods.QueryWispContextKey(pimcContext);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ internal IntPtr FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, Int
// to this we release capture if we currently have it.
try
{
if(_source.HasCapture )
if(_source.HasCapture)
{
SafeNativeMethods.ReleaseCapture();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ private void _RegisterTextStore(TextStore textstore)

// Create a TSF document.
_threadManager.CreateDocumentMgr(out doc);
doc.CreateContext(_clientId, 0 /* flags */, textstore, out context, out editCookie);
doc.CreateContext(_clientId, flags: 0, textstore, out context, out editCookie);
doc.Push(context);

// Attach a thread focus sink.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2409,14 +2409,7 @@ internal bool CriticalRequestProcessing(bool force)
return succeeded;
}

private bool IsWindowNull()
{
if(_window == null)
{
return true;
}
return false;
}
private bool IsWindowNull() => _window is null;

private bool RequestForegroundProcessing()
{
Expand Down

0 comments on commit 88d6691

Please sign in to comment.