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

[FancyZones] swap window location between zones when drag and dropping windows on each other (or using keyboard) #290

Open
spitoman opened this issue Sep 7, 2019 · 17 comments
Labels
FancyZones-Dragging&UI FancyZone dragging / interaction issue Idea-Enhancement New feature or request on an existing product Product-FancyZones Refers to the FancyZones PowerToy

Comments

@spitoman
Copy link

spitoman commented Sep 7, 2019

PowerToys FancyZones: swap window location between zones when drag and dropping windows on each other.
for example i'm using a 3 column zone. i want it to act like this so that when i drag the window from the right side and drop it on the left zone, the locations of the windows swap with each other automatically.

I added a diagnostic file and recreated the issue/requests for this Feedback: https://aka.ms/AA6079y

@enricogior enricogior added Idea-Enhancement New feature or request on an existing product Product-FancyZones Refers to the FancyZones PowerToy labels Sep 8, 2019
@wolispace
Copy link

I second this suggestion:

Summary of the new feature/enhancement

When dragging a window into a FancyZone that already has a window it in, provide some way of pulling the existing window out so it is not stuck behind.

An example.. I have a 4 zone layout - two large at the top, two smaller fill space at the bottom.

If I want to drag a window from a small zone into a big zone, it would be wonderful if the current window in the big zone is pushed down into the small zone.. they switch positions.

In the case where a new window has been opened at some random location.. and you drag it into a fancyZone, providing a way of pulling the existing window out of the fancy zone and swapping it with the randomly placed window would work nicely (for me) too.

I understand we are not putting windows in an out of zones, just auto-sizing them (which is great as we can manually adjust size after dropping in a zone) but using the analogy of putting in an out of zones is how it feels. So s switch places would be great.

Proposed technical implementation details (optional)

Maybe using CTRL drag instead of SHIFT drag?

Or (if there is space given the blank boarder around the zones) adding a small tab 'Switch' so you can switch positions not just stomp over the existing window.

Thinking of tabs.. maybe the more windows in a zone the more 'tabs' you get to bring that window to the foreground (again a crazy idea as they are not 'in' the zone just sized to it).

@enricogior enricogior changed the title PowerToys FancyZones: swap window location between zones when drag and dropping windows on each other [FancyZones] swap window location between zones when drag and dropping windows on each other Jul 30, 2020
@enricogior
Copy link
Contributor

Adding a reference to #1918 that proposes to use Win + Alt + arrows to have this functionality available using the keyboard.

@enricogior enricogior added the FancyZones-Dragging&UI FancyZone dragging / interaction issue label Jul 30, 2020
@enricogior enricogior added this to the v1.0 Release milestone Aug 17, 2020
@enricogior enricogior changed the title [FancyZones] swap window location between zones when drag and dropping windows on each other [FancyZones] swap window location between zones when drag and dropping windows on each other (or using keyboard) Feb 11, 2021
@SamuelStevenson
Copy link

Yes! This feature would be incredible. Rather than using multiple monitors, I use one large one with a primary window location in the center and secondary window locations on either side. It would be a wonderful boon for my workflow to be able to quickly swap the location of the window in my primary location with a window in a secondary location.

@captainwasabi
Copy link

Suggestions:

  1. Would like this to have a setting to make this the default behavior
  2. Kbd shortcut to swap focused window with a specific pane (either pane 1 or a pane specified in a setting). if the focused window is not in a pane, the swapped window is resized to the same size (not to the size it was prior to being pane'd)

@Bigdoggydog
Copy link

Would love a setting to turn this on. Window Swap. I use a 4K display and have several zones on the sides and bottom with a primary work zone in the top-center. When I need to switch my focus to a different app I'll probably move my current focused app to an empty side bar (requiring that one of my sidebars remain empty), then move the app I want to focus on now to the center. That's a lot of pointing and clicking and moving.

@enricogior enricogior removed this from the Stability Release milestone Apr 16, 2021
@enricogior enricogior reopened this Apr 19, 2021
@fripSide
Copy link

Hello, is this feature enabled now? It is extremely important for using Ultra-Large Screen (32 inches 4k screen).
swap-zone

The best practice is to use the largest zone as the working area and put smaller windows on the corners so that I can quickly find the windows I need to use and swap it to the working area.

@PavelDanov
Copy link

PavelDanov commented Nov 24, 2021

Hello, is this feature enabled now? It is extremely important for using Ultra-Large Screen (32 inches 4k screen). swap-zone

The best practice is to use the largest zone as the working area and put smaller windows on the corners so that I can quickly find the windows I need to use and swap it to the working area.

I was looking for the same thing because I have a 49" ultrawide and what I did was to override Windows Snap (Win + arrows) for that.

image

It's not perfect. but it works if you want to bring a window to the central pane. Still I'd love a stack approach like in Linux desktop managers like dwm or xmonad.

@Bigdoggydog
Copy link

I'm not sure the snap shortcut is what we're looking for. (Not myself, anyway). I want to have windows in small zones around the screen (I use a 55" 4k tv) and a large central zone for working. As I move on to different tasks and applications, I want to drag the window from a smaller zone to the center and have what was in the center "swap" with the window I just grabbed from the smaller zone. To me it's a kind of "minimizing" but with a larger screen it lets me see the content of the "minimized" screen. That makes task switching much faster without separate shortcut keys. Drag, drop, & swap.

A stack would be ok, but I still want to see the contents of the windows at-a-glance.

@JovialMockingbird
Copy link

I see a number of people with bigger screens requesting this feature but as someone who uses double monitors I would also love if it worked between monitors. The second monitor makes it so I rarely stack my windows, instead I hand them off to the second screen where I can still monitor everything. It would greatly reduce the amount of inputs required to rearrange windows.

My preferred functionality would be when dragging a window to a zone that's already 'occupied' it would automatically swap the two windows. Alternatively it would swap only while holding an activator.

@byamagata
Copy link

+1 to this feature. If I knew how to add to this repo I would probably try to do it myself, but alas.... I dont. lol

@PavelDanov
Copy link

I think I found a good solution for folks with big screens - https://github.com/fuhsjr00/bug.n

If you're familiar with window tiling managers on Linux it should feel familiar.

@vladiko2
Copy link

Is this something on the roadmap? That would be extremely useful, no matter the monitor size! Maybe holding a down a hotkey when dragging a window into another zone? - With hotkey down windows would swap. Without hotkey down - standard behavior. This feature would really make FancyZones a perfection! Thanks in advance!

@ezedoska
Copy link

ezedoska commented Jun 6, 2023

+1 to this, would be very useful and a natural flow for how we change the focus of what we are currently doing in various windows
+1 to default behavior or modifier key while moving option

i have two monitors if that info helps

@Knochi
Copy link

Knochi commented Jan 25, 2024

Hi,

suggested the same. Using one 4K 32“ screen with work area and two small zones.

@merstad
Copy link

merstad commented Aug 6, 2024

Second this. Would be extremely useful to be able to swap position of windows using keyboard.

@thesobercoder
Copy link

Shameless plug, check out the Polygon tool that I built because of the lack of this feature.

https://github.com/thesobercoder/polygon

@KenHamilton
Copy link

Shameless plug, check out the Polygon tool that I built because of the lack of this feature.

https://github.com/thesobercoder/polygon

How does your tool address this issue? I can't see anything mentioning it.

davidegiacometti pushed a commit to davidegiacometti/PowerToys that referenced this issue Jan 9, 2025
This subtly regressed in microsoft#244, so subtly that I didn't really notice it till I fixed it.

In that PR, we replaced the `visibility` binding of the `ProgressBar` with a binding to `IsInitialized`. For most pages, this actually just works fine - they're only initialized once they return some results. And most pages are only loading until they first return something.  

But the trick is with pages that do some `Loading` _after_ they're initialized. For them, the progress bar never shows up, because `Initialized` is already true.

I actually only stumbled upon this because of a totally different bug (which this also fixes). 

In rare cases we'd load a little out of order, and the ShellPage would try to determine if it should hide the `ErrorMessage` or not. About 25% of the time, it would evaluate `{x:Bind ViewModel.CurrentPage.ErrorMessage, Converter={StaticResource StringNotEmptyToVisibilityConverter}, Mode=OneWay}` _before_ the `CurrentPage` got set, so it would show it initially. That looked real janky.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FancyZones-Dragging&UI FancyZone dragging / interaction issue Idea-Enhancement New feature or request on an existing product Product-FancyZones Refers to the FancyZones PowerToy
Projects
None yet
Development

No branches or pull requests