Bug 388810 - "Tile windows by dragging them to the side of the screen" puts window borders off the screen edge
Summary: "Tile windows by dragging them to the side of the screen" puts window borders...
Status: CONFIRMED
Alias: None
Product: Breeze
Classification: Plasma
Component: window decoration (other bugs)
Version First Reported In: 5.11.4
Platform: Fedora RPMs Linux
: NOR minor
Target Milestone: ---
Assignee: Hugo Pereira Da Costa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-11 14:28 UTC by Oliver Ghingold
Modified: 2025-02-17 08:33 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
attachment-16046-0.html (1.87 KB, text/html)
2022-11-15 23:02 UTC, Oliver Ghingold
Details
Window border bleeding to right hand side screen when using screen edge snap (1.78 MB, image/png)
2025-01-16 15:21 UTC, Janne_Viitala
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Ghingold 2018-01-11 14:28:26 UTC
System info:

Distribution + Release: Fedora 27
KDE Plasma Version: 5.11.4
KDE Frameworks Version: 5.41.0
Qt Version: 5.9.2
Kernel Version: 4.14.11-300.fc27.x86_64
OS Type: 64-bit

Configuration info:

Settings => Application Style => Theme: Breeze
Settings => Application Style => Border size: Large
Settings => Desktop Behavior => Screen Edges => "Tile windows by dragging them to the side of the screen": Enabled

Steps to reproduce: 

(1) Tile a window by dragging it to a screen edge

Expected behavior:

The entire window should be fit into the tile area

Actual behavior:

At the horizontal and bottom screen edge, the window border is left outside of the tile area, meaning that the horizontal and bottom window borders cannot be used to resize the window.

Confirmation that this is what is happening:

(1) Plug in a second monitor and arrange it so that it shares the border of the monitor where a window was tiled.
(2) Observe that the window border from the tiled window appears on the second monitor.

Current Workaround:

Drag the window away from the screen edge by its title bar and fit it to the desired screen edges manually by using the snap-to-screen-edge behavior of the window resize tool.

Suggested Mitigation:

"Tile windows by dragging them to the side of the screen" should use the same window border / screen edge detection as the snap-to-screen-edge behavior of the window resize tool.
Comment 1 Kai Uwe Broulik 2018-01-11 15:12:17 UTC
What "window resize tool"? Are you sure it's the window border and not just the shadow leaking to the other screen?
Comment 2 Oliver Ghingold 2018-01-11 15:15:47 UTC
(In reply to Kai Uwe Broulik from comment #1)
> What "window resize tool"? Are you sure it's the window border and not just
> the shadow leaking to the other screen?

The window resize tool is the tooltip that shows up when the cursor hovers over a window border. Holding down the mouse button allows the window to be resized by dragging the border manually. That is what I meant by "window resize tool." I apologize if that was unclear.

And yes, I'm certain it's not only the shadow leaking: the window resize tool does not appear at the screen edges where the border is hidden, but does appear on the second monitor where I reference the window border being pushed out to. If the leak to the other monitor was only the shadow then the window border would still be manually resizeable from the original monitor where the window was tiled. That is not the case.
Comment 3 Martin Flöser 2018-01-11 17:43:22 UTC
The screen borders are exported to KDecoration. Breeze could make use of it to disable the borders when at a screen.
Comment 4 Oliver Ghingold 2018-01-11 17:48:26 UTC
(In reply to Martin Flöser from comment #3)
> The screen borders are exported to KDecoration. Breeze could make use of it
> to disable the borders when at a screen.

I've already confirmed that the borders are not actually disabled, only moved outside the viewable region. Otherwise I would not be able to see/manipulate the window border after plugging in a second monitor, unless the window was being completely redrawn when the second screen came up. That's possible, but the behavior is consistent enough with the window borders simply not being taken into mathematical account when the window is tiled that I think I'm onto enough of a "something" to justify this ticket.

If there really is a combination of configuration changes that could resolve this issue then I'd be genuinely curious to know what you think they are so that I could test them. Otherwise there may be an underlying issue with how kwin tiles windows when they are dragged to screen edges.
Comment 5 Hugo Pereira Da Costa 2018-01-11 20:48:10 UTC
So when you maximize (partially or fully) a window by dragging it from the edges, the fact that the borders are not drawn and that you cannot resize (at least from the same screen), from the side along which the window is maximize, is a feature. Not a bug.
You can disable the feature by checking "Allow resizing maximized windows from window edges" in breeze deco config (in which case: borders are drawn, and you can resize from them)

Now, that you can resize the maximized window from the next screen is probably a bug, which I will try to reproduce as soon as I have two screens. I am not sure whether this is a bug in breeze though. (breeze decides which borders are drawn and which are not depending on the maximized state and the selected options already. It does not decide about the resize areas. That is kwin.)
Comment 6 Hugo Pereira Da Costa 2018-01-11 20:49:54 UTC
(In reply to Oliver Ghingold from comment #0)
> System info:
> 
> Distribution + Release: Fedora 27
> KDE Plasma Version: 5.11.4
> KDE Frameworks Version: 5.41.0
> Qt Version: 5.9.2
> Kernel Version: 4.14.11-300.fc27.x86_64
> OS Type: 64-bit
> 
> Configuration info:
> 
> Settings => Application Style => Theme: Breeze
> Settings => Application Style => Border size: Large
> Settings => Desktop Behavior => Screen Edges => "Tile windows by dragging
> them to the side of the screen": Enabled
> 
> Steps to reproduce: 
> 
> (1) Tile a window by dragging it to a screen edge
> 
> Expected behavior:
> 
> The entire window should be fit into the tile area


Unless I misunderstood the issue, this expected behavior is what you would get by selecting the option "Allow resizing maximized windows from window edges" in breeze decoration config. 
Please double check, confirm, and close this report if indeed this is the case.
Comment 7 Oliver Ghingold 2018-01-11 20:56:28 UTC
(In reply to Hugo Pereira Da Costa from comment #6)
> (In reply to Oliver Ghingold from comment #0)
> > System info:
> > 
> > Distribution + Release: Fedora 27
> > KDE Plasma Version: 5.11.4
> > KDE Frameworks Version: 5.41.0
> > Qt Version: 5.9.2
> > Kernel Version: 4.14.11-300.fc27.x86_64
> > OS Type: 64-bit
> > 
> > Configuration info:
> > 
> > Settings => Application Style => Theme: Breeze
> > Settings => Application Style => Border size: Large
> > Settings => Desktop Behavior => Screen Edges => "Tile windows by dragging
> > them to the side of the screen": Enabled
> > 
> > Steps to reproduce: 
> > 
> > (1) Tile a window by dragging it to a screen edge
> > 
> > Expected behavior:
> > 
> > The entire window should be fit into the tile area
> 
> 
> Unless I misunderstood the issue, this expected behavior is what you would
> get by selecting the option "Allow resizing maximized windows from window
> edges" in breeze decoration config. 
> Please double check, confirm, and close this report if indeed this is the
> case.

I can confirm that this configuration item resolves my issue. However, I do recommend that you attempt to reproduce the issue of window borders of tiled windows appearing on added displays, as that was what primarily led me to believe that this was a drawing issue and not a configuration option.
Comment 8 Nate Graham 2018-01-12 21:49:15 UTC
Hugo, what are your feelings about renaming

"Allow resizing maximized windows from window edges"
to
"Allow resizing maximized and tiled windows from window edges"

?
Comment 9 Hugo Pereira Da Costa 2018-01-14 10:12:44 UTC
(In reply to Nate Graham from comment #8)
> Hugo, what are your feelings about renaming
> 
> "Allow resizing maximized windows from window edges"
> to
> "Allow resizing maximized and tiled windows from window edges"
> 
> ?

No strong objection, but: I fear the text is a tad too long, and also, "tiled" sounds a bit like jargon. up to you.
Comment 10 Nate Graham 2018-01-15 20:53:33 UTC
https://phabricator.kde.org/D9900

No strong feelings either, but I figured I'd open it up for discussion anyway to see what folks think.
Comment 11 Christoph Feck 2018-01-30 00:41:42 UTC
Code change from comment #10 was abandoned. Should we also abandon this ticket, or are there other possible ways to resolved it?
Comment 12 Justin Zobel 2022-11-15 22:58:40 UTC
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 13 Oliver Ghingold 2022-11-15 23:02:54 UTC
Created attachment 153787 [details]
attachment-16046-0.html

Window edges still go off of the screen when I use the mouse shortcut for
having them take up either 50% or 25% of the screen (ie dragging them to
the sides or corners with the mouse) but not when I drag the edges with the
arrow controls, but I don't know how to change the status of a ticket and
was unable to convince anyone that this is an issue the last time anyone
replied to this ticket.

On Tue, Nov 15, 2022 at 2:58 PM Justin Zobel <bugzilla_noreply@kde.org>
wrote:

> https://bugs.kde.org/show_bug.cgi?id=388810
>
> Justin Zobel <justin.zobel@gmail.com> changed:
>
>            What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>              Status|REPORTED                    |NEEDSINFO
>          Resolution|---                         |WAITINGFORINFO
>
> --- Comment #12 from Justin Zobel <justin.zobel@gmail.com> ---
> Thank you for reporting this issue in KDE software. As it has been a while
> since this issue was reported, can we please ask you to see if you can
> reproduce the issue with a recent software version?
>
> If you can reproduce the issue, please change the status to "REPORTED" when
> replying. Thank you!
>
> --
> You are receiving this mail because:
> You reported the bug.
Comment 14 Janne_Viitala 2025-01-16 15:21:42 UTC
Created attachment 177416 [details]
Window border bleeding to right hand side screen when using screen edge snap

- Setup with two monitors. 
- Screen edge snapping (Settings → Window Management → Window Behavior → Movement → Screen edge snap zone) is on - set to 10px. 
- When window is moved/resized to the right edge of the left screen, it snaps to the screen edge. In this case the window border appears to the right hand side screen, which looks like a bug to me.