Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -1550,16 +1550,24 @@ private void RepaintSplitterRect()
{
if (IsHandleCreated)
{
using Graphics g = CreateGraphicsInternal();
if (BackgroundImage is not null)
try
{
using TextureBrush textureBrush = new(BackgroundImage, WrapMode.Tile);
g.FillRectangle(textureBrush, ClientRectangle);
using Graphics g = CreateGraphicsInternal();
if (BackgroundImage is not null)
{
using TextureBrush textureBrush = new(BackgroundImage, WrapMode.Tile);
g.FillRectangle(textureBrush, ClientRectangle);
}
else
{
using var solidBrush = BackColor.GetCachedSolidBrushScope();
g.FillRectangle(solidBrush, _splitterRect);
}
}
else
catch (ExternalException)
{
using var solidBrush = BackColor.GetCachedSolidBrushScope();
g.FillRectangle(solidBrush, _splitterRect);
// GDI+ can transiently fail while the display session is transitioning (for example, lock/unlock).
// Ignore repaint failures here and let normal painting recover once graphics resources are available.
Comment thread
LeafShi1 marked this conversation as resolved.
}
}
}
Expand Down
Loading