Gala: Tiling an identically-sized window causes window to glitch

Created on 20 Jul 2018  路  13Comments  路  Source: elementary/gala

Originally reported by @ntilotta at https://github.com/elementary/os/issues/102

elementary OS Juno 5.0 (Beta 1)

If you open an electron-based app, this usually freezes after minimize/maximize, then for example Atom is transparent if you launch it maximized, and every application loses user' settings after you close and re-open it.

I've also noticed similar issues when tiling Google Chrome, both with and without the "system title bar and borders" option checked. I imagine it's the same bug since both are using Chromium and that cross-platform window code.

Confirmed High

Most helpful comment

I hope that this is helpful. I can get this to reproduce consistently:

  1. Open Electron-based app that saves previous window size (e.g. Signal)
  2. Tile the app (left or right doesn't matter)
  3. Close the app
  4. Reopen the app
    => It should open at the same size it was before
  5. Try to tile the app
    => app wigs out

This can avoided by changing the app window size before tiling. Also, after the app wigs out, you can rescue it by maximizing and unmaximizing. Then you can adjust the window size and then tiling works.

Because this specifically happens when the app window starts at the same size as it would be after tiling, I wonder if it's related to this other bug: this comment suggests that weird things are happening when there's an animation on a window whose size is exactly the same before and after an animation.

All 13 comments

I noticed this with Insomnia. But this is not occure with Slack, for example

I've had the tiling issues with both Chrome and VSCode

I just found a slightly stranger issue, but I thought I'd report it here in case it is related. If it's not related it can be its own issue.

VSCode did the broken tiling thing again, so I opened the multitasking view so I could close the window. After I closed it it the window stayed on my desktop and won't go away. I can open and close more windows of VSCode but this phantom window remains.

image

And, because I thought it was funny, here's Principles overlaying the phantom window:

image

I can also confirm this affect VSCode, Discord and Steam (which should also use some CEF components, but i'm not sure).

If you are able to find the edge of the window and resize it, the window will go to its correct position and correctly resize.

I hope that this is helpful. I can get this to reproduce consistently:

  1. Open Electron-based app that saves previous window size (e.g. Signal)
  2. Tile the app (left or right doesn't matter)
  3. Close the app
  4. Reopen the app
    => It should open at the same size it was before
  5. Try to tile the app
    => app wigs out

This can avoided by changing the app window size before tiling. Also, after the app wigs out, you can rescue it by maximizing and unmaximizing. Then you can adjust the window size and then tiling works.

Because this specifically happens when the app window starts at the same size as it would be after tiling, I wonder if it's related to this other bug: this comment suggests that weird things are happening when there's an animation on a window whose size is exactly the same before and after an animation.

Getting this inconsistently but often with Thunderbird and Chrome.

EDIT: Sorry didn't fully read @suprko 's comment in https://github.com/elementary/gala/issues/305#issuecomment-447943648, I can reproduce 100% including with additional apps: Gitkraken, Terminal, Brave, Skype, Slack, AppCenter.

@carn1x Terminal and AppCenter are not electron apps... That might be a different issue you are seeing, or the scope of this issue is different then what we thought.

@btkostner here's the steps I take:

  1. Open AppCenter, snap to right-side of the screen, all is fine
  2. Close AppCenter and reopen it, observe it is still in same window position/size
  3. Snap to the right-edge again, either by mouse drag or keyboard shortcut, and observe the window freezes and is not interactive entirely (though the carousel aspect of App Center Home tab still seems to animate)
  4. Use the Super+Up shortcut to maximize the window and regain interactivity and normal function.

@carn1x maybe this is the correct issue - #377

It seems like Gala has an issue where a window attempts to tile to its exact same size, which is probably the actual root cause. Native apps might not usually exhibit this because they change padding on the headerbar when tiling, so maybe their window size changes and avoids the issue.

This sounds like the same underlying issue as: https://github.com/elementary/gala/issues/341
Which was fixed in: https://github.com/elementary/gala/pull/387 but it has not been merged yet.

@carn1x and to anyone else:

Anytime the window freezes all you have to do is super + UP
This will reestablish functionality within that titled window

To prevent these freezes

  • When you ctrl+super+Right to tilt the window right repeat the same command so the window centers itself back to the middle then crtl+super+left to tilt the window to the left
  • When you have a program open (on the right) and you want to tilt that the new one to the left... before doing that make sure you super + UP to reestablish the window size then you can ctrl+super+left

I hope this helps anyone who is having this issue.

Was this page helpful?
0 / 5 - 0 ratings