M7S / dockbarx

289 stars 40 forks source link

No preview for minimized windows #160

Open tomas-chrastina opened 3 years ago

tomas-chrastina commented 3 years ago

Hello.

When I minimize window, its preview is replaced with program icon. It is kind of confusing, and not helping to distinguish windows.

Is there any way this could/should work, or is this by design?

Thank you in advance.

xuzhen commented 3 years ago

We can't get preview image of minimized window due to the limitation of X11 APIs. If you really want this feature, try the patches in this issue

tomas-chrastina commented 3 years ago

What about an option to capture window preview when minimizing? I'm not familiar with X11 programming, but I think there are some hooks that wold allow taking of screenshot right before window is minimized? And use it, even when it's not actualized. I would prefer this option rather than icon and visual unappealing mix of icon/previews.

VisibilityNotify Events ?

xuzhen commented 3 years ago

There is no such hook in the X11's server-client model. All the ***Notify events are sent after the corresponding operation is completed. So there is no way to take a screenshot right before the window is minimized.

A workaround is to take a screenshot when certain properties of the window are updated, but this will consume more system resources and may also cause some problems. I've committed https://github.com/xuzhen/dockbarx/commit/80acc686713177259ac3c94d001dda9a2cdb92cb to implement this feature. It's experimental and not be enabled by default. If you are willing to try this feature, enable it in dbx_preference.

My PPA has already updated.