Browser-laptop: Brave is not maximized when re-launched

Created on 1 May 2017  路  12Comments  路  Source: brave/browser-laptop

Test plan

  1. Launch Brave on Windows
  2. Maximize the window
  3. Quit Brave and relaunch
  4. Window should open in the maximized state

Original issue description

  • Did you search for similar issues before submitting this one?

  • Describe the issue you encountered:

    However, I still experience this issue. I've only seen screenshots of Windows 10 and references to 'Windows' in general (and Mac OS X and Linux). So perhaps the issue is now limited to previous versions of Windows. I'm experiencing this problem on Windows 7, 64-bit. It does not happen for other programs.

User confirmed issue on clean install also

  • Platform (Win7, 8, 10? macOS? Linux distro?):
    Windows 7 64bit

  • Brave Version (revision SHA):
    Brave: 0.15.1
    rev: ea5024d1f3e47d34de79b70e3cd74f1408c985ce

  • Steps to reproduce:

    1. Open browser in maximized window
    2. Close and restart the browser
    3. Maximized window not retained
  • Screenshot if needed:

  • Any related issues:

    7664

OWindows Qchecked-Linux Qchecked-Win64 Qtest-plan-specified bug misfullscreen-option release-noteinclude

Most helpful comment

I've been playing around with clean installs and see when exactly the problem occurs. It happens when the startup setting is changed from the default setting "My windows / tabs from last time". Perhaps in addition to which tabs were opened, it also saves the exact position and layout.
image

I'm sorry if my previous remark about the Lastpass/Do not track was misleading. I must have changed the "Brave starts with" setting without paying attention.

All 12 comments

I still have this on Windows 10. The window has the right dimensions, but it's not in the maximized state and its position is off by a few pixels.

User(Stefan) provided additional info on the issue

When I performed clean install of Brave, initially the problem is gone.

However, when start tweaking in the settings the problem returned. (I added Lastpass and switched "Send a 'Do Not Track' header with browsing requests *")

I've been playing around with clean installs and see when exactly the problem occurs. It happens when the startup setting is changed from the default setting "My windows / tabs from last time". Perhaps in addition to which tabs were opened, it also saves the exact position and layout.
image

I'm sorry if my previous remark about the Lastpass/Do not track was misleading. I must have changed the "Brave starts with" setting without paying attention.

Maximizing the window, closing the browser, then reopening browser still results in the window opening with the correct proportions, not in the maximized state, and offset to the left and up by about 8-9 pixels. This is a fresh install on Windows 10 Home, with no settings changed. Also happens on Windows 10 Professional and Windows 7 Ultimate.
offset

The _maximized_ state is not presently being stored in the session-store-1 file. There should be a isMaximized property, according to https://github.com/brave/browser-laptop/blob/master/docs/state.md:

"perWindowState": [
    {
        "activeFrameKey": 1,
        "closedFrames": [],
        "frames": [{鈥],
        "hamburgerMenuWasOpen": false,
        "ui": {
            "bookmarksToolbar": {},
            "contextMenu": {
                "selectedIndex": null
            },
            "menubar": {
                "isVisible": false,
                "lastFocusedSelector": null
            },
            "tabs": {
                "tabPageIndex": 0
            }
        }
    }
],

When this is fixed, it would be good to write a webdriver test to confirm (can look at example code used for session store). Might be hard though, since it'll only run on Linux

+1 community (see # 6 in this post: https://community.brave.com/t/issue-small-bugs-found-in-first-couple-hours-of-using-brave/5075)

+1 from community (https://community.brave.com/t/when-opened-brave-does-not-maximize/5251)

+1 from #10455

Here is my little workaround on Debian. (I always prefer my browser maximized though.) I saved the script to my ~/bin and named it brave. This requires xdotool and wmctrl.

#!/bin/bash
open_status=$(pgrep "brave" | wc -l)
if ((open_status <= 2)); then
    /usr/bin/brave -- "$@" & sleep 2; wmctrl -r :ACTIVE: -b remove,maximized_vert,maximized_horz; sleep 1; wmctrl -r :ACTIVE: -b add,maximized_vert,maximized_horz
elif [ -n "$1" ]; then
    /usr/bin/brave -- "$@"
else
    /usr/bin/brave; xdotool key ctrl+t
fi
Was this page helpful?
0 / 5 - 0 ratings