Forum > Unix
Bring window of another application on top of all other application windows
(1/1)
Ricco42:
Hi guys,
I try to bring a specific window of another application on top of all other application windows if I press a button in my application.
My OS is Ubuntu 20.04.3 LTS.
My code highlights the other application in the Bottom Panel and if it was minimized it restores the window but it is not on top of all other application windows.
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---[...]uses Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, xlib, x, ctypes, DateUtils;[...] procedure TForm1.Button4Click(Sender: TObject);var display: PDisplay; fenster: TWindow; root:TWindow; standard_bildschirm:cint; myevent:TXEvent;begin fenster:=$36000fc; display := XOpenDisplay(nil); if (display = nil) then ShowMessage('Display Zugriff fehlgeschlagen :('); standard_bildschirm:=DefaultScreen(display); root:=RootWindow(display,standard_bildschirm); myevent._type:=ClientMessage; myevent.xclient.message_type:=XInternAtom(display,'_NET_ACTIVE_WINDOW',false); myevent.xclient.window:=fenster; myevent.xclient.format:=32; XSendEvent(display, root, False, VisibilityChangeMask OR StructureNotifyMask OR SubstructureRedirectMask OR FocusChangeMask OR PropertyChangeMask, @myevent); XMapWindow(display,fenster); XFlush(display); XCloseDisplay(display); end;
Ricco42:
Can be closed. Moved the post to » Programming » Operating Systems » Linux .
Navigation
[0] Message Index