linuxmint / linuxmint/cinnamon

Windows Resize and Relocate Often When Opened (Dual Monitor Setup)

Open
#13,063 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

BUG
Dominant language
JavaScript
Stars
5.6k
Forks
915
Avg merge
5d 22h
Merged PRs (30d)
3

Description

Distribution

Linux Mint 22.1

Package version

Cinnamon 6.4.8

Graphics hardware in use

Tested on multiple hardware: GeForce 980 and Intel Xe

Frequency

Quite often

Bug description

Upon a fresh install with dual 4k60 monitors there is a peculiar bug:

Almost every time I open up a gui app that has been installed it doesn't maintain it's previous window location and dimensions. What's even more annoying is some apps like Telegram get larger almost every time they are opened to the point it is larger than the screen and now isn't visible on the screen. Even when doing ctrl+cmd(windows key)+←(left arrow) to get it onto the screen it doesn't work due to the window size. I only notice this is the case because I can plug or unplug a second monitor which resizes everything and I can see a quarter of the window now filling up up my whole screen.

Updated information: The reason ctrl+cmd(windows key)+←(left arrow) doesn't work is the window opens up larger than the main screen with the task bar on it, but the second screen doesn't have a task bar allowing a slightly larger window. Trying to move the window back to the main screen doesn't work due to the slightly smaller resolution. I have to turn on the second monitor, resize the window, then I can move it over.

This is a pretty bad bug. It is reproducible on two different computers with a fresh install. Right now if I maximize the window I'm using it tends to stay in place.

Apps tested on so far:

  • Telegram
  • Signal Messenger
  • LibreWolf Browser
  • Firefox (Flatpak version)
  • Brave Browser
  • VSCodium
Steps to reproduce

Here's an example picture of it happening:

Right mouse click Open With -> Other Application:
Image
Why did the window open up with such odd resolution? I didn't stretch it wide like that.

It's pretty easy to reproduce, just close the window (or hide it into the taskbar) and then reopen it. HOWEVER, as more time goes on the worse the problem is, so you're less likely to see the issue if you open and close the window quickly. I find if I wait 24 hours with a monitor being turned on and off during that time the issue is far more likely to happen. Some minor issues happen 100% of the time like closing the Signal Messenger window so it hides to the task bar then clicking on the task bar icon to open it, 100% of the time it moves upwards a bit. The worse bug isn't moving location, but the window itself resizing, which doesn't happen every time.

The worst app offenders for me right now are VSCodium and Telegram Messenger.

My default settings:

  • Dark Mode theme
  • Dual 4k60 monitors at 200% user interface scale. (Issue exists on a single 1080p monitor.)
    Most everything else is vanilla as best as I can tell.
Expected behavior

Window size and location should be remembered.

Partial Fix

If I right mouse click on the panel bar and click 'Add a new panel' then add a panel bar in the same place at the same height on the second monitor, now to windows both screens are the same resolution.

When windows are opened new or from minimized, when they lose their height resolution they default to a taller window. This forces windows on to the secondary screen without a panel bar, but now that it has one and both monitors are the same height, Cinnamon shrinks the window height to the appropriate height instead of moving the window to a new location. This gets rid of the bug.

In an ideal world when using the mouse and dragging a corner to change the size of a window it should lock to the panel bar on the bottom of the screen instead of letting the user drag the window below the title bar. This keeps windows from being too large from the get go, then minimized or closed, then reopened and resized because the window is too large to fit on the screen. Or alternatively don't treat the panel bar like reserved space when a new window is opened so it can open up behind the panel bar. Either solution would fix it. The former solution is more ergonomic and polished.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source files, tests, or entry points are named. Start by reproducing the window placement and resizing behavior with dual monitors, differing panel heights, and the listed applications; done means reopened windows retain valid sizes and locations without being forced off-screen.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
desktop, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.