Bug 409612 - Disable shadows when windows are put side by side
Summary: Disable shadows when windows are put side by side
Status: RESOLVED INTENTIONAL
Alias: None
Product: kwin
Classification: Plasma
Component: scene-opengl (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-08 08:34 UTC by Raphaël Jakse
Modified: 2019-07-15 14:41 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Okular and kate side by side - with shadows (514.16 KB, image/png)
2019-07-15 07:13 UTC, Raphaël Jakse
Details
Okular and kate side by side - without shadows (452.80 KB, image/png)
2019-07-15 07:13 UTC, Raphaël Jakse
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Raphaël Jakse 2019-07-08 08:34:30 UTC
SUMMARY

I like to put windows side by side when I work with both / all them at the same time (maybe editing a document in a text editor and showing it with a PDF viewer), and KWin has support to make this easy.

However, while I like shadows under windows, I find them distracting when they are put side by side.
The easy workaround on X11 is to disable compositing (using Alt+Shift+F12) but this does not feel like a satisfying long-term solution.

I'd argue that shadows are useless, and actu in this specific case and that KWin should not draw them (it could instead offer an option to merge the borders and allow resizing the two windows sharing the border at the same time, but this is an idea for another bug report).

STEPS TO REPRODUCE
1. Put two windows side by side (e.g. by moving one window to the left of the screen and another to the right, or top/bottom), or 4 windows at the corners.

OBSERVED RESULT

In a setting with two windows, the shadow of the window having the focus partly covers the other window.
In a setting with four windows, this is a mess.

EXPECTED RESULT

No shadow should be drawn when the whole workplace is filled with non-overlapping windows. This probably do not "cover" (pun intended) all cases, but it should work for most common ones. Additionally, it may be nicer if the corners are squared, like when windows are maximized.

This may be seen as a generalization of the case when a window is maximized (but with resizable windows).
Comment 1 David Edmundson 2019-07-08 09:31:00 UTC
>I'd argue that shadows are useless,

They hint at focus and drag resize areas.

I don't think this should be changed.
Comment 2 Nate Graham 2019-07-15 02:46:41 UTC
Same. Without shadows, tiled windows that happen to have the same edge colors will visually blend into one another, which looks bad (turn off compositing and then tile some windows and you'll see what I mean). Also, without shadows, the only way to tell which window is in the foreground would be by looking at titlebar colors. When using a color scheme in which the titlebar doesn't change color on gain or loss of focus (e.g. the Breeze Dark or Breeze Light color schemes), then it's impossible. For those reasons, I think it has to stay as it is.
Comment 3 Raphaël Jakse 2019-07-15 07:12:38 UTC
To be completely clear, I agree that shadows in the general case should stay, and removing them would be problematic (unfortunately, I screwed up my previous message). Had I found them useless in the general case, I would have completely disabled them.

I take note that this is considered intentional but for posterity, here are screenshots where I find shadows distracting rather than helpful, and focus enough shown thanks to the title bars.
Comment 4 Raphaël Jakse 2019-07-15 07:13:15 UTC
Created attachment 121519 [details]
Okular and kate side by side - with shadows
Comment 5 Raphaël Jakse 2019-07-15 07:13:47 UTC
Created attachment 121520 [details]
Okular and kate side by side - without shadows
Comment 6 Nate Graham 2019-07-15 14:23:56 UTC
(In reply to Raphaël Jakse from comment #3)
> and focus enough shown thanks to the title bars.

That's fine for you since you use the default Breeze color scheme. But for users of Breeze Dark, or Breeze Light--or any other color scheme where the titlebar doesn't change much or at all in response to changing focus--it wouldn't work at all. That's why we can't just unconditionally disable shadows for tiled windows. We need to support those use cases too.

Thanks for understanding!
Comment 7 Christoph Feck 2019-07-15 14:31:37 UTC
I use Kile, which is Kate+Okular integrated into one application :)
Comment 8 Raphaël Jakse 2019-07-15 14:41:52 UTC
Fair enough.

I still think this would be beneficial. I guess working on this idea would require thorough thinking if more people wanted this, to avoid breaking people's workflow (https://xkcd.com/1172/). Should someone be interested in this in the future, I'm willing to participate in the, don't hesitate to shout at me.

Thanks for your time, and particularly Nate for kindly answering my wishes / ideas here every single time!

Christoph Feck: Thanks for your suggestion. Kile is really nice, though this bug prevents me from really using it: https://bugs.kde.org/show_bug.cgi?id=406836
I can't write a patch for now, maybe later when I have more time if this is still an issue.
I also use texstudio from time to time for grammar spelling, but it has a similar bug unfortunately (and it's not Kate, which I became somewhat dependent on…).