aboutsummaryrefslogtreecommitdiff
path: root/src/GetWindows.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/GetWindows.cs')
-rw-r--r--src/GetWindows.cs21
1 files changed, 0 insertions, 21 deletions
diff --git a/src/GetWindows.cs b/src/GetWindows.cs
index 336f8b1..0508a88 100644
--- a/src/GetWindows.cs
+++ b/src/GetWindows.cs
@@ -9,13 +9,6 @@ namespace hyprwatch.Window
public partial class GetWindows
{
-
- [DllImport("user32.dll")]
- static extern IntPtr GetForegroundWindow();
-
- [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
- static extern int GetClassName(IntPtr hWnd, StringBuilder lpClassName, int nMaxCount);
-
public static string ActiveWindow()
{
string desktopEnv = Environment.GetEnvironmentVariable("XDG_CURRENT_DESKTOP");
@@ -92,20 +85,6 @@ namespace hyprwatch.Window
}
}
- else if (os == "Windows")
- {
-
- IntPtr handle = GetForegroundWindow();
- if(handle != IntPtr.Zero)
- {
- StringBuilder className = new StringBuilder(256);
- if(GetClassName(handle, className, className.Capacity) > 0)
- {
- activeWindow = className.ToString();
- }
- }
- }
-
if(activeWindow == null)
{
activeWindow = "Home-Screen";