1

The Problem:

Strangely enough, I've had this problem on every operating system I've used, including Windows.

Sometimes windows open not-quite-fullscreen. I don't know why they do that, I certainly didn't leave the app like that last time I closed it. There's usually like a pixel or two between the top edge of the window and the edge of the screen, as well as at the bottom.

This is extremely annoying because I don't usually look that closely, and then more often than not, when I try to click the "X" in the top right corner, I actually miss the window and click whatever is behind it - usually the "X" of another window that I didn't want to close.

The most recent case of this was Yakuake's keyboard shortcut config window. I ended up closing my browser instead, with lots of open tabs.

This shouldn't be possible to happen at all. I see zero legitimate use cases for windows doing that. Sure, there is snapping, but that only applies when I'm moving the window myself, not when a new window opens.

Question:

Is there some way to configure xorg/kwin to prevent windows from opening only almost fullscreen? Say, a 10px margin at the screen edges (except at the bottom because of the task bar) where if the window is within all of them, it automatically gets properly maximized? Again, KDE's built-in snapping doesn't work because I'm not moving the window myself.

Edit: Yes, I know about kwin window rules. No, they don't offer a solution.

1 Answer 1

1

Create a rule https://userbase.kde.org/KWin_Rules for all windows, in Size & Position choose "Maximized Horizontally/Vertically" -> Apply Initially.

You're done.

4
  • Sorry, but this is overkill. Window rules in kwin have very limited conditions: class, type, role, title, machine. None of that lets you make the change conditional on current size. Your suggestion means that every new window gets maximized initially, which has too many drawbacks. Commented Jul 17, 2021 at 23:20
  • So, you want some arbitrary unmaximized windows to be maximized based on what? KWin exactly offers you a solution. Commented Jul 18, 2021 at 4:34
  • I'm describing very precisely based on what in my question. Commented Jul 19, 2021 at 2:48
  • "Is there some way to configure xorg/kwin to prevent windows from opening only almost fullscreen?" Um, no. You have not specified which windows you want to maximize. Commented Jul 19, 2021 at 10:07

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.