brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.01k stars 2.21k forks source link

Minimum Snapping Window Size is Too Big #39047

Open InklingGirl opened 3 weeks ago

InklingGirl commented 3 weeks ago

Description

On a 1920×1080p display, brave-browser (installed via apt-get from the project's official Deb repo) doesn't snap to the side of my screen as the expected 961-width window, it is instead 6 pixels wider & so overlaps w/ w/e is snapped to the other side.

Also, presumably due to my desktop configuration (I use the GNOME Shell extension dash-to-panel w/ the 'Keep original gnome-shell top panel' setting switched on) the snapped window is also rendering 23 lines taller than it needs to be, drawing behind the dash-to-panel transparent taskbar.

Neither of these related issues were a thing before today's update.

EDIT: I now notice that it must be even wider than 6 extra pixels, because when snapped to the right while on a page w/ a scrollbar, the scrollbar is occluded by the edge of the screen by a few pixels too, so it's snapping beyond the screen.

Steps to reproduce

  1. Run brave-browser
  2. Snap window to a side of the screen
  3. Snap another window (brave-browser or any other program) to the other side & observe the slight overlap between them

Actual result

brave-browser window is too wide & (w/ & in relation to dash-to-panel) too tall: 2024-06-15_01-15

Expected result

brave-browser window to be the appropriate dimensions when snapped.

Reproduces how often

Easily reproduced

Brave version (brave://version info)

1.67.115 Chromium: 126.0.6478.56 (Official Build) (64-bit)

e1f8b4850805c2eea958bad7220c5e6e9202efaa

Linux

Channel information

Reproducibility

Miscellaneous information

More specific details about my OS:

Ubuntu 22.04.4 LTS (Jammy Jellyfish) on the Linux 6.5.0-35-generic kernel (kernel via latest first-party OS updates) & the GNOME 42.9 desktop environment (default DE) w/ Wayland window server (default session), etc.

nhaggin commented 3 weeks ago

I am experiencing the same issue with the same version of Brave on Linux Mint 21.3/Cinnamon 6.0.4, on a system with dual 3840x2160 monitors.

nhaggin commented 3 weeks ago

I just installed 1.67.116/Chromium: 126.0.6478.71, and can confirm that the problem persists. Mint 21.3/Cinnamon 6.0.4, kernel 6.5.0-35.

InklingGirl commented 3 weeks ago

I just installed 1.67.116/Chromium: 126.0.6478.71, and can confirm that the problem persists.

Thanks for doing that for me @nhaggin (I neglected to in my report), I guess that must mean it's an upstream bug. My Linux kernel's 6.5.0-35-generic too apparently.

N1ve5h commented 3 weeks ago

I am on OS: Linux Mint 21.3 x86_64, Kernel: 6.5.0-35-generic. I am experiencing the same issue. In the second step if I did another brave browser window, the window will overflow like a few pixels into my second monitor.

InklingGirl commented 3 weeks ago

the window will overflow like a few pixels into my second monitor

@N1ve5h this is what I imagine would happen to me if I had a second monitor, based on what I noted here:

EDIT: I now notice that it must be even wider than 6 extra pixels, because when snapped to the right while on a page w/ a scrollbar, the scrollbar occluded by the edge of the screen by a few pixels too, so it's snapping beyond the screen.

InklingGirl commented 3 weeks ago

The issue seems to have gone away for me?? I don't think brave-browser updated between now & when I opened this issue, although I did boot cycle. Leaving the issue open for now.

EDIT: I spoke too soon, it's back specifically w/ new windows.

hogsmead commented 3 weeks ago

Upstream issue: https://issues.chromium.org/issues/346799706

InklingGirl commented 2 weeks ago

Also, I notice that often when I fullscreen, the video is scaled beyond the full res of my screen & so the edges of it & the player are cut off.

iraklisg commented 2 weeks ago

I noticed the same behavior in Manjaro Linux - Gnome version

InklingGirl commented 2 weeks ago

As of the newest brave-browser update:

1.67.119 Chromium: 126.0.6478.114 (Official Build) (64-bit)

The initial window snapping size issue & #39080 appear to be completely resolved.

nhaggin commented 3 days ago

The issue is persisting for me with Brave 1.67.123 (Chromium 126.0.6478.126) on Mint 21.3/Cinnamon 6.0.4, but only if I do not use the system title bar/borders. Chromium itself exhibits the same behavior under the same conditions.

For example, here's Brave without system title bar: brave-snap

And here's Chromium with the system title bar: chromium-snap

Both windows are snapped to the top of my desktop; Brave is snapped to the right and Chromium to the left. Behavior is triggered independent of which edge is used to snap.

InklingGirl commented 3 days ago

will reopen