8000 Remove SecurityCriticalData/Class by JeremyKuhne · Pull Request #9882 · dotnet/wpf · GitHub
[go: up one dir, main page]

Skip to content

Remove SecurityCriticalData/Class #9882

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Address feedback
  • Loading branch information
JeremyKuhne committed Oct 4, 2024
commit 88d669104d53b9909fbde51a8ae3dd8aa3dbd355
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