Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent Collapse/Uncollapse when snapping to corners in Windows #155

Open
Aluerie opened this issue Dec 28, 2024 · 2 comments
Open
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@Aluerie
Copy link
Contributor

Aluerie commented Dec 28, 2024

Describe the bug
If I snap the discord window to the screen corner then the collapsing/uncollapsing elements like member/channel/server lists seems to be inconsistent. I guess, clips below showcase it enough: I snap the window to the same edge but it can result in both collapsed/uncollapsed situations.

Steps to reproduce the behavior

  1. Turn on Size Collapse feature of the plugin;
  2. Snap discord to an edge of the screen on Windows machine;
  3. See how it inconsistently collapses/uncollapses elements;

Expected behavior
The plugin should properly see to which exact size the discord window should be resized after snapping.

Screenshots

half.mp4
full2.mp4

Desktop

  • OS: Windows 11 24H2
  • Discord Version: Stable
  • Enabled Theme(s): None
  • Enabled Plugins: Turned everything else off for testing

Additional context
Otherwise, the plugin works fine for like cursor-arrows resize. Not sure if there is something wrong in my settings. And I think this wasn't happening with 8.x.x version of the plugin. Maybe, this is some Windows^tm tier problem.

Also same can happen when using maximize button.

@Aluerie Aluerie added the bug Something isn't working label Dec 28, 2024
@Aluerie Aluerie closed this as completed Jan 7, 2025
@Aluerie Aluerie reopened this Jan 7, 2025
@programmer2514
Copy link
Owner

Does this happen with all other plugins disabled?

For some context, the plugin calls on window.outerHeight/outerWidth for its calculations, which are standard JS window properties. It seems this is caused by the window being refreshed halfway through resizing, and the onresize event not being fired once snapping is complete.

That could be an issue with Electron or even a Windows issue, which would make it hard to account for without some hackery. Does it still happen if you disable "Animation effects" in Widows settings?

I'll see what I can do, but I can't promise a quick fix on this one unfortunately.

@programmer2514 programmer2514 self-assigned this Jan 20, 2025
@programmer2514 programmer2514 added the help wanted Extra attention is needed label Jan 20, 2025
@Aluerie
Copy link
Contributor Author

Aluerie commented Jan 21, 2025

Does this happen with all other plugins disabled?

yes, also just in case, tested with 9.1.0 - still happens.

if you disable "Animation effects" in Widows settings?

it was already off

event not being fired once snapping is complete.

A wrong collapsing/uncollapsing can also happen when we "unsnap" the window by grabbing its topbar with a cursor, if that's any help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants