Recent

Author Topic: How to minimize a X11 window  (Read 707 times)

Key-Real

  • New Member
  • *
  • Posts: 21
How to minimize a X11 window
« on: March 14, 2021, 01:02:37 pm »
I have a main loop like:

var
     e:TxEVENT;

...

  while XPending(gfxDisplay)<>0 do begin
              XNextEvent(gfxDisplay,@e);

              if (e._type=keypress) or (e._type=keyrelease) then break;
  end;




how to minimize a X11 window?

MarkMLl

  • Hero Member
  • *****
  • Posts: 2841
Re: How to minimize a X11 window
« Reply #1 on: March 14, 2021, 02:28:20 pm »
Since this is normally something done by the window manager rather than by a program itself, I suspect that you're going to need to invoke wmctrl. You might find that you can use an API instead, but it would be functionally equivalent.

Working out the API will almost certainly be a pain, but it would be a better choice since you can't rely on wmctrl being universally installed... I had to investigate this stuff a few months ago since I needed a list of windows that looked like unrequited dialog(ue)s for monitoring purposes.

MarkMLl
Turbo Pascal v1 on CCP/M-86, multitasking with LAN and graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

 

TinyPortal © 2005-2018