https://bugs.kde.org/show_bug.cgi?id=466451

            Bug ID: 466451
           Summary: Chromium/Chrome with client-side decorations (CSD)
                    lose tiling when header is clicked
    Classification: Plasma
           Product: kwin
           Version: 5.27.1
          Platform: Archlinux
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: Custom Tiling
          Assignee: kwin-bugs-n...@kde.org
          Reporter: breakingsp...@gmail.com
                CC: notm...@gmail.com
  Target Milestone: ---

Created attachment 156746
  --> https://bugs.kde.org/attachment.cgi?id=156746&action=edit
readds "if (interactiveMoveResizeGravity() != Gravity::None)"

SUMMARY
When Chromium windows with client-side decorations are when snapped to a tile,
focusing the browser window by single-clicking on the tab header will cause the
window to lose it's tiling and return to it's previous size. 

This occurs with both the new Shift+drag Custom Tiling, and legacy Quick Tiling
(after the commit where the new tiling was introduced). Tiling functions
normally with client-side decorations off, but this is less than ideal.

So far I can only identify Chromium+Chrome as affected, Firefox behaves like
normal with similar client-side decorations to Chromium. Of course, Chromium's
decorations are outside of Kwin scope, but I may have found a fix, below.

STEPS TO REPRODUCE
1. Open Chromium with "Use system title bar and borders" disabled, note the
window size before snapping.
2. Snap the window to a tile using either the new Shift modifier, or the old
quick corners/keys.
3. Click the blank space in the title bar once, the window will lose it's
snapping and return to original size.

OBSERVED RESULT
Window leaves tile and jumps back to original size, keeps position

EXPECTED RESULT
Window should focus/activate and remain static in the tile unless dragged or
double-clicked (maximize)

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch / Plasma 5.27.1 (and master)

ADDITIONAL INFORMATION
The issue was introduced when the new Custom Tiling system was integrated, I
found this particular block affects the windows in question:
https://invent.kde.org/plasma/kwin/-/commit/e4507861f7b5ba563ae7cd5ce036a42a09f9edf8?page=2#4901cf4a1e41ceabcf8333e2929683619d4f0698_1664_1663

Adding the extra if check back in seems to resolve the issue for me, the
Chromium windows behave as expected and stay snapped to the new and old tiles
when focusing. 

if (m_tile && !m_tile->supportsResizeGravity(interactiveMoveResizeGravity())) {
    if (interactiveMoveResizeGravity() != Gravity::None) { 
        setQuickTileMode(QuickTileFlag::None);
    }
}

Attached the patch i'm testing with. I'm still tinkering so I can understand
the particulars and find out if there are adverse effects.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to