Forum > Unix

How to minimize a X11 window

(1/2) > >>

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?

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.


Take a look at how xdotool does it. It uses the XIconifyWindow function to minimize any window.

So the function you are looking for is XIconifyWindow:

rsz, я не думаю, что в данном случае, это правильное решение. Человек обрабатывает события приходящие.

Key-Real, события FocusIn и FocusOut.
Если есть желание, посмотрите процедуру в ZenGL - app_ProcessMessages. Модуль zgl_application.

Вообще довольно странно, что я нашёл больше информации на русском языке, чем на английском. Andru описывал на своём сайте создание низкоуровневых приложений для Linux.
ссылка, описание на русском  :(

google translate:
rsz, I do not think that in this case, this is the correct solution. The person processes incoming events.

Key-Real, FocusIn and FocusOut events.
If you want, look at the procedure in ZenGL - app_ProcessMessages. Zgl_application module.

In general, it's rather strange that I found more information in Russian than in English. Andru described on his website how to create low-level applications for Linux.
link, description in Russian :(


--- Quote from: Seenkao on August 05, 2021, 09:52:59 pm ---

In general, it's rather strange that I found more information in Russian than in English.

--- End quote ---


No  - that is known history.
The USSR had worldwide the best eduction in natural science.
Today the percentage of students  of computer science in the USA with an US-Passport is: 5% !!!

In the early days of the web there were a lot of russian pages with great Delphi-solutions. Especially for Low-Level-Jobs. You would not find them in other languages.

Like one ingenious pearl:
A soundcard driver for the PC speaker .....
Poor man's solution.....



[0] Message Index

[#] Next page

Go to full version