Commit 3e3d40d
committed
🐛 fix: fix(viewer): wayland resize stability + CSD edge resize handles
Problem: KWin bypasses Qt's setMaximumSize for frameless windows during
cross-origin navigation (YouTube sign-in). Window stretches to ~3300px
when compositor receives null textures from QtWebEngine during page load.
Root cause: Wayland compositors reset frameless window geometry when
QtWebEngine produces null textures during cross-origin navigation.
Fix: lock window size with setFixedSize() on loadStarted, unlock on
loadFinished. Prevents compositor geometry changes during vulnerable
transition period.
Additional fixes:
- Add _ResizeHandle widget class → transparent edge overlays for CSD
resize from left/right/bottom borders + bottom corners
- Replace broken mouseMoveEvent/mousePressEvent approach (child widgets
consume events) with independent handle widgets per edge
- Each handle owns its cursor + calls startSystemResize() on drag
- Handles hidden when maximized/fullscreen, repositioned on resize
- JS reflow dispatch on loadFinished → fix YouTube sidebar layout after
size lock release
- Clamp restored geometry to 90% of screen in _load_geometry()
- Enforce screen-size max via _enforce_screen_limits()
- Lift max-size limit before fullscreen, restore after exit1 parent 0346056 commit 3e3d40d
1 file changed
Lines changed: 66 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
| |||
319 | 320 | | |
320 | 321 | | |
321 | 322 | | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
322 | 342 | | |
323 | 343 | | |
324 | 344 | | |
| |||
546 | 566 | | |
547 | 567 | | |
548 | 568 | | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
549 | 572 | | |
550 | 573 | | |
551 | 574 | | |
| |||
674 | 697 | | |
675 | 698 | | |
676 | 699 | | |
677 | | - | |
| 700 | + | |
678 | 701 | | |
679 | 702 | | |
680 | 703 | | |
681 | 704 | | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
682 | 709 | | |
683 | 710 | | |
684 | 711 | | |
| |||
745 | 772 | | |
746 | 773 | | |
747 | 774 | | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
748 | 811 | | |
749 | 812 | | |
750 | 813 | | |
751 | 814 | | |
752 | 815 | | |
753 | 816 | | |
| 817 | + | |
754 | 818 | | |
755 | 819 | | |
756 | 820 | | |
| |||
0 commit comments