I have a java graphic application using Swing library. If the application is minimized and the graphic content changes (color or whatever), I should see the modification when restoring the window. However, the window is not updated and is still like the previous state. If I resize the window or move it, it is refreshed.

I run this program on a linux system using X11 1.17.2 and Mutter 3.14.4 as window manager. I know the problem come from the message sent by X11 or from mutter configuration because the program worked on another system working with X11 1.10.4 and Metacity 2.28.0.

How can I configure Mutter to permit it to update applications on deiconify, as well as it does for resizing ? Or have I to configure X11 ? I do not know how to solve this problem at all...


Mutter is a compositing window manager. It likely preserves the window buffer, even when de-iconified. This is useful for window-switching features. For example, the GNOME3 "overview" shows the full contents of all windows, including iconified ones. Metacity does not do compositing, so it does not use any offscreen buffers.

What you describe would be a bug in Mutter and/or your X11 client program. That is, you should assume it is not an issue of configuration.

The bug could be in your code, or in Java/Swing. To be fair, if you were manually detecting if your window is iconified and then avoiding requesting a repaint, I suspect you might have already realized that was the problem :-).

Thinking about GNOME3, I can imagine this was not well-tested because stock GNOME3 does not have a "Minimize" button in the window titlebars.

There is a work-around you can try in your code. I assume it is pretty obvious :-). I.e. listen for the window to be de-iconified, and then request a repaint.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.