Virtual edge confinement for windows to prevent cursor overshoot into top bar

Hi everyone

I’ve run into some small friction point with gnome.

Problem:

When using browsers (Firefox, Chromium, etc.) with tab bars at the top of the window, I like to push my cursor to the top edge and slide left/right while holding it against the top to quickly move between tabs.

On Windows, the screen edge acts as a physical barrier, once you push up, you can slide left/right freely without worrying about vertical position. The edge keeps your cursor locked at the right height.

In GNOME, you face two problems:

  1. Pushing up too far hits the GNOME top bar instead of the tabs
  2. No vertical constraint. Even if you hit the tab bar, you must manually keep your mouse perfectly level while sliding - there’s no edge to prevent drifting up or down, making the motion slower and less reliable

My Proposed Solution:

Add an optional virtual edge toggle in the right-click window title bar menu that creates a cursor barrier at a window’s top boundary.

How it works:

  1. Enable: Right-click window title bar → toggle virtual edge for that window
  2. Behavior: When pushing the cursor upward, it stops at the window’s top edge instead of entering the GNOME top bar, allowing you to slide left/right freely without vertical drift or overshoot
  3. Temporary bypass: Hold a modifier key to intentionally reach the GNOME top bar when needed
  4. Persistence: Setting is saved per-window and restored across sessions