mirror of
https://github.com/SourMesen/Mesen2.git
synced 2025-04-02 10:21:44 -04:00
18 lines
389 B
C#
18 lines
389 B
C#
using Avalonia.Controls;
|
|
using Avalonia.VisualTree;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Mesen.Utilities
|
|
{
|
|
static class ControlExtensions
|
|
{
|
|
public static bool IsParentWindowFocused(this Control ctrl)
|
|
{
|
|
return (ctrl.GetVisualRoot() as WindowBase)?.IsKeyboardFocusWithin == true;
|
|
}
|
|
}
|
|
}
|