bahamondev / hide-titles

A Kwin script which hides window title when is maximized
GNU General Public License v3.0
13 stars 6 forks source link

A transparent border appears at the bottom of the window #10

Closed fansuregrin closed 1 year ago

fansuregrin commented 3 years ago

As shown in the figure below, after the window is maximized and restored to its normal size, a transparent border appears at the bottom of the window.

bahamondev commented 3 years ago

distro & Plasma version?

fansuregrin commented 3 years ago

distro & Plasma version?

Sorry, I forgot to explain this information. I use kde and archlinux. The kde version is 5.22.1.

fansuregrin commented 3 years ago

distro & Plasma version?

Sorry, I forgot to explain this information. I use kde and archlinux. The kde version is 5.22.1.

The situation where I have this problem is like this: I use the breeze window decoration, the window is set with a shadow, and I set the shortcut key to maximize. When I opened your script, used the shortcut key to maximize and then used the shortcut key to restore the original window size, the problem in the picture appeared. But when I close your script, repeat the above operation and it is normal.

piotrintes commented 3 years ago

That fixes the problem:

workspace.clientMaximizeSet.connect(function(client, horizontalMaximized, verticalMaximized) { if (config.allowed(client)) { if (horizontalMaximized && verticalMaximized) { csd.eval(client); client.noBorder = true; } else { client.noBorder = csd.isCsd(client); var geom = client.geometry; geom.x = geom.x + 1; client.geometry = geom; geom.x = geom.x - 1; client.geometry = geom; } } });

It forces kwin to redraw window again after the title bar was restored, so shadow will be drown correctly this time.