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


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



  while XPending(gfxDisplay)<>0 do begin

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

how to minimize a X11 window?


  • Hero Member
  • *****
  • Posts: 2875
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.

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:


TinyPortal © 2005-2018