4 changed files with 33 additions and 7 deletions
@ -0,0 +1,28 @@ |
|||||||
|
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); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue