You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
779 B
29 lines
779 B
1 year ago
|
using System;
|
||
|
using System.Collections.Generic;
|
||
|
using System.Linq;
|
||
|
using System.Runtime.InteropServices;
|
||
|
using System.Text;
|
||
|
using System.Threading.Tasks;
|
||
|
|
||
|
namespace AksWebBrowser.Devices
|
||
|
{
|
||
|
public class WindowStalker
|
||
|
{
|
||
|
[DllImport("libX11")]
|
||
|
private static extern bool XRaiseWindow(IntPtr display, IntPtr window);
|
||
|
|
||
|
[DllImport("libX11")]
|
||
|
private static extern IntPtr XOpenDisplay(string displayName);
|
||
|
|
||
|
[DllImport("libX11")]
|
||
|
private static extern IntPtr XDefaultRootWindow(IntPtr display);
|
||
|
|
||
|
public static void BringWindowToFront()
|
||
|
{
|
||
|
IntPtr display = XOpenDisplay(null);
|
||
|
IntPtr rootWindow = XDefaultRootWindow(display);
|
||
|
XRaiseWindow(display, rootWindow);
|
||
|
}
|
||
|
}
|
||
|
}
|