Bringing a window to the foreground on Linux

I’ve been using this method for Mac and Windows, but I can’t seem to find anything to do the job on Linux. Anybody got any ideas?

[code]Public Sub BringToFront()
#if TargetMacOS
Declare Function NSClassFromString Lib “Cocoa” (ClassName As CFStringRef) As Ptr
Declare Function SharedApplication Lib “Cocoa” Selector “sharedApplication” (Target As Ptr) As Ptr
Declare Sub ActivateIgnoringOtherApps Lib “Cocoa” Selector “activateIgnoringOtherApps:” (Target As Ptr, Flag As Boolean)

Dim SharedApp As Ptr = SharedApplication(NSClassFromString("NSApplication"))
ActivateIgnoringOtherApps(SharedApp, True)

#elseif TargetWin32
Declare Function BringWindowToTop Lib “User32” (Target As Int32) As Boolean
Call BringWindowToTop(Self.Handle)
#Pragma Error “No code to bring a window to foreground on this platform.”

End Sub[/code]

perhaps if you make it fullscreen = true (this should bring it to the forground) then back you’ll get what you need?

or maximize:

as the docs say If the window is not visible when Maximize is called, it becomes visible.
not sure if this actually brings it to the front.

gtk_window_present or gtk_window_present_with_time () maybe ?