vscode-vibrancy-continued icon indicating copy to clipboard operation
vscode-vibrancy-continued copied to clipboard

[Bug]: Windows 11 - Resize on drag

Open reececomo opened this issue 1 year ago • 8 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Current Behavior

When moving the window around on Windows 11, the vscode window shrinks. Not related to built-in snapping features.

Resolution: 3840 x 2160 pixels Scale: 150%

Expected Behavior

Window will retain its existing size.

Steps To Reproduce

  1. In Windows 11
  2. Naked installation
  3. 4K resolution (16:9) with scale at 150%
  4. Drag the window around

Environment

- OS: Windows 11
- VSCode: 1.72.2
- Extension: 1.1.9

Anything else?

No response

reececomo avatar Oct 25 '22 00:10 reececomo

Open issue exists in the old plugin: https://github.com/EYHN/vscode-vibrancy/issues/109

reececomo avatar Oct 25 '22 00:10 reececomo

Likely related to scale factor here: https://github.com/illixion/vscode-vibrancy-continued/blob/27803a92af08de4355bdc6d72e8be59c39c14c34/runtime/win10refresh.js#L181

reececomo avatar Oct 25 '22 00:10 reececomo

I have the same issue!

ynsgnr avatar Oct 29 '22 16:10 ynsgnr

Thanks, will check this out. I’m not sure if this Windows 10 fix is even needed still, so I might just remove it entirely when I get a chance to test Vibrancy on a Windows 10 machine.

illixion avatar Oct 30 '22 15:10 illixion

I have deleted this lines manually from index.js at VS_CODE_PATH\data\extensions\illixion.vscode-vibrancy-continued-1.1.9\runtime\index.js and run "reload vibrancy" command. It works now!

const win10refresh = require('./win10refresh.js');
win10refresh(window, 60);

ynsgnr avatar Oct 31 '22 17:10 ynsgnr

I have deleted this lines manually from index.js at VS_CODE_PATH\data\extensions\illixion.vscode-vibrancy-continued-1.1.9\runtime\index.js and run "reload vibrancy" command. It works now!

const win10refresh = require('./win10refresh.js');
win10refresh(window, 60);

Thanks to your comment, I narrowed down the problem.

The problem with that previous solution is that disabling it causes window resizing to be incredibly slow, which is apparently part of what these functions were fixing.

To fix it entirely, go into VS_CODE_PATH\data\extensions\illixion.vscode-vibrancy-continued-1.1.9\runtime\win10refresh.js

And comment out the entire function win.on('will-move', (e, newBounds), but leave everything else

This way we can have our cake and eat it too. Of course there's now jitter (don't remember if it was there before or not), but at least it "works" mostly now

Also, since we changed disableJitterFix, we can change the win.on('move' from

		if (disableJitterFix) {
			return false
		}

to

		if (isInSnapZone()) {
			return false
		}

Although I honestly didn't see any changes in functionality regardless

MolotovCherry avatar Nov 18 '22 16:11 MolotovCherry

I have deleted this lines manually from index.js at VS_CODE_PATH\data\extensions\illixion.vscode-vibrancy-continued-1.1.9\runtime\index.js and run "reload vibrancy" command. It works now!

const win10refresh = require('./win10refresh.js');
win10refresh(window, 60);

Thanks to your comment, I narrowed down the problem.

The problem with that previous solution is that disabling it causes window resizing to be incredibly slow, which is apparently part of what these functions were fixing.

To fix it entirely, go into VS_CODE_PATH\data\extensions\illixion.vscode-vibrancy-continued-1.1.9\runtime\win10refresh.js

And comment out the entire function win.on('will-move', (e, newBounds), but leave everything else

This way we can have our cake and eat it too. Of course there's now jitter (don't remember if it was there before or not), but at least it "works" mostly now

Also, since we changed disableJitterFix, we can change the win.on('move' from

		if (disableJitterFix) {
			return false
		}

to

		if (isInSnapZone()) {
			return false
		}

Although I honestly didn't see any changes in functionality regardless

Thank you for looking into this, tested these changes on my end and everything works well, I've just pushed an update with your changes

illixion avatar Nov 21 '22 08:11 illixion

I have deleted this lines manually from index.js at VS_CODE_PATH\data\extensions\illixion.vscode-vibrancy-continued-1.1.9\runtime\index.js and run "reload vibrancy" command. It works now!

const win10refresh = require('./win10refresh.js');
win10refresh(window, 60);

Thanks to your comment, I narrowed down the problem.

The problem with that previous solution is that disabling it causes window resizing to be incredibly slow, which is apparently part of what these functions were fixing.

To fix it entirely, go into VS_CODE_PATH\data\extensions\illixion.vscode-vibrancy-continued-1.1.9\runtime\win10refresh.js

And comment out the entire function win.on('will-move', (e, newBounds), but leave everything else

This way we can have our cake and eat it too. Of course there's now jitter (don't remember if it was there before or not), but at least it "works" mostly now

Also, since we changed disableJitterFix, we can change the win.on('move' from

		if (disableJitterFix) {
			return false
		}

to

		if (isInSnapZone()) {
			return false
		}

Although I honestly didn't see any changes in functionality regardless

Thank you for looking into this, tested these changes on my end and everything works well, I've just pushed an update with your changes

Maybe I shouldn't have used "fix" so freely. I meant it's more of a workable solution until it truly gets fixed. I don't know what problems or side effects my method will cause, especially cause I'm not really familiar with the code or with electron

Commenting out the entire will move function may not be good since I don't completely understand the code (for some reason I'm getting high gpu/cpu usage. I'm not sure why)

(In either case, the issue author was right when they said the problem was probably with the scale factor. That appears to me where the problem is as well)

MolotovCherry avatar Nov 21 '22 13:11 MolotovCherry