Go back

Emerald unmaximize fix

Emerald unmaximize fix
Description
A monkeypatch for the Linux desktop environment
Project type
Personal — open source / freeware
Start date
March of 2019
End date
March of 2019
Project URL
https://github.com/K0V0/emerald-unmaximize-fix
Skills

About project

A monkeypatch for a problem in the desktop environment of Linux systems. It is a daemon written in C that runs in the background from system startup.

For several years now, Linux has suffered from a strange problem that appears when you use Compiz Fusion effects together with the Emerald window decorator and the hack that removes window decorations (that is, the titlebar - the strip with the window name and buttons like maximise, minimise and close) on maximised windows, to gain extra space on the screen.
In that case the window buttons and the window menu are displayed by panel applets installed in the top XFCE / Gnome (MATE) panel, which is basically an imitation of the way it works in the MacOS desktop

When a window is restored from maximised back to its original state, however, the decorations sometimes do not come back.
The decorations do come back mysteriously if some flag is set on the window, or if its text - the window title - changes (in the window of the Pidgin IM program, for example, when a new message arrives)

That fact was enough to build this program. The principle is basically that the daemon watches the state of the windows, and if one of them changes state from maximised to something else, the daemon changes the window title by adding and removing a space, which forces a redraw and brings the window decorator back.