question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug]: Windows 11 - Resize on drag

See original GitHub issue

Is there an existing issue for this?

  • 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

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
ynsgnrcommented, Oct 31, 2022

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);
0reactions
MolotovCherrycommented, Nov 21, 2022

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)

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to disable automatic resizing when dragging window in ...
How to disable automatic resizing when dragging window in Windows 11. How to Change the Taskbar Size in Windows 11 ...
Read more >
8 Fixes When You Can't Resize Window in Windows 11 and 10
1. Try Keyboard Shortcuts to Resize a Window · 2. Turn Off Tablet Mode · 3. Uninstall TeamViewer · 4. Close All Apps...
Read more >
Windows 11:Can't move or resize windows/applications
I can right click it and select move and then move the application with my arrow keys but that's so slow compared to...
Read more >
Fix maximized window won't drag in Windows 11/10
To force drag a window, press and hold the Shift key and right-click the program's taskbar icon. Select Move from the menu that...
Read more >
Enable or Disable Drag to Snap windows in Windows 11
This tutorial will show you how to enable or disable Snap windows by dragging a window to the screen edge for your account...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found