Ubuntu 20.04.4双窗口分屏操作失效,如何实现VS Code与Chrome同步分屏?
Hey there! Let's get that window snapping working so you can code in VS Code and preview your Chrome changes side-by-side. Here are some practical steps to troubleshoot the problem:
Check if window snapping is enabled
Open your system settings (press the Super key and search for "Settings"), navigate to Devices > Displays, and make sure the "Enable window snapping" option is checked. If it was disabled, turning it on should make yourCtrl+Super+←/→shortcuts work immediately.Verify your keyboard shortcut settings
Head to Settings > Keyboard Shortcuts, scroll down to the "Windows" section, and look for "Snap window to left" and "Snap window to right". Confirm that the assigned shortcuts match the ones you're using (Ctrl+Super+←andCtrl+Super+→). If they've been changed accidentally, click the shortcut field and reassign your preferred combination.Try mouse-based window snapping
If shortcuts aren't cooperating, use the mouse method as a workaround: hold the title bar of your VS Code window, drag it to the left edge of your screen—you'll see a highlight covering half the screen. Release the mouse, and VS Code will lock into that half. Repeat the same for Chrome on the right edge.Rule out shortcut conflicts
Some third-party apps or custom tools might be hijacking yourCtrl+Supershortcuts. Try closing all non-essential background apps (like terminal customizers, productivity tools, etc.) and test the snapping shortcuts again. If it works, you'll need to adjust the conflicting app's shortcut settings.Reset GNOME settings (for default desktop)
If none of the above works, a GNOME settings reset might fix underlying configuration glitches. Open a terminal and run:dconf reset -f /org/gnome/This will reset all your GNOME customizations (like desktop layout, shortcuts, etc.), so make sure to note any important settings before proceeding. Reboot your system after running the command.
Update your system
Outdated packages can sometimes cause functionality bugs. Open a terminal and run these commands to install all available updates:sudo apt update sudo apt upgrade -yReboot once the updates finish, then test the snapping feature again.
内容的提问来源于stack exchange,提问作者Emma Donery

