quicktile icon indicating copy to clipboard operation
quicktile copied to clipboard

"monitor-switch" keybinding should adjust dimensions if window is tiled

Open ssokolow opened this issue 12 years ago • 1 comments

If a window is tiled and then the monitor-switch command (Ctrl+Alt+KP_Enter by default) is used to switch it to a monitor with different geometry (different dimensions, different panels, etc.), it will retain its old shape despite that shape no longer corresponding to the preset.

This shouldn't need to wait until the massive redesign required for implementing #10 properly. All I need to do is divide up cycleDimensions so this algorithm becomes possible:

  1. Call the code cycleDimensions uses to identify the preset the window currently matches.
  2. Call the current code in cmd_cycleMonitors
  3. Call the code cycleDimensions uses to apply a specific preset in order to re-apply the preset from step 1.

ssokolow avatar Oct 01 '13 14:10 ssokolow

I'm finally getting around to clearing out all of these issues and a fix for this should be available within the next day or two. I think I'll apply an even simpler and more generally-applicable algorithm than I described:

  1. Calculate the current dimensions as a percentage of the old monitor.
  2. Resolve the percentages to pixel dimensions on the new monitor.

Then, it won't matter whether it matches a preset... just whether the user wants the window resized. (And the "if it's tiled" part can be handled by completing my fix for #20 with detection of the stored "tiling state" information being stale.)

ssokolow avatar Aug 23 '17 15:08 ssokolow