digitalcreations / MaxTo

Public issue tracker for MaxTo
https://docs.maxto.net
76 stars 5 forks source link

Unable to move window to virtual desktop #615

Closed bumbeen closed 3 years ago

bumbeen commented 4 years ago

Describe the bug

Cannot move window to another virtual desktop. To Reproduce

  1. Create a recipe that moves foreground window to second virtual desktop. Expected behavior

    Window moves to second virtual desktop. Screenshots

System information:

Additional context

2020-09-16 12:05:50 [Core@2.1.0.675] [Information] [MaxTo.Core.Recipes.DefaultRecipeController] Executing recipe "startup" based on trigger "MaxTo.Core.Settings.Triggers.HotkeyTriggerConfiguration" 2020-09-16 12:05:50 [Core@2.1.0.675] [Information] [MaxTo.Core.Keyboard.RecipeExecutor] Executing recipe '"startup"' with 1 ingredients 2020-09-16 12:05:50 [Core@2.1.0.675] [Warning] [MaxTo.Core.Keyboard.RecipeExecutor] Received exception from command request 1 while executing '"startup"'. Aborting. System.ArgumentException: Virtual desktops are only supported on Windows 10. at MaxTo.Core.Commands.Window.MoveCommand.d5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at MaxTo.Core.Commands.CommandBase`2.d1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at MaxTo.Core.Commands.CommandExecutor.d__2.MoveNext() 2020-09-16 12:05:50 [Core@2.1.0.675] [Information] [MaxTo.Core.Recipes.DefaultRecipeController] 1 recipes was executed (0 succesfully)

image

vegardlarsen commented 4 years ago

@bumbeen Does this issue still persist in version 2.1.0-beta.3? You can switch to that release by setting your update channel in the app to Beta, and then restarting MaxTo twice.

There was a bug in the virtual desktop library we used for version 2.0.1, which could result in this error.

bumbeen commented 4 years ago

Yes this is on 2.1.0-beta.3. REcipe did not work in stable version either. Guessing something with my PC.

vegardlarsen commented 4 years ago

Here is the recipe I tried just now (on 2.1.0-beta.3):

    {
      "name": "Test",
      "hotkey": null,
      "triggers": [
        {
          "type": "keyboard:hotkey",
          "Hotkey": "Alt+Windows+T"
        }
      ],
      "ingredients": [
        {
          "command": "window:move",
          "parameters": {
            "virtualdesktop": "1",
            "region": "center",
            "monitor": "$primary"
          }
        }
      ]
    }

Note that the virtual desktop number is "off by one", i.e. the first virtual desktop is numbered 0. I will be fixing that as well.

This recipe works on my machine.

There was a bug in 2.0.1 which produced the exact error message you are providing, but we've since fixed that (sorry I missed that you were running 2.1.0-beta.3 initially).

It could be a versioning issue with your version of Windows. Do you have the option of upgrading Windows to e.g. 2004?

vegardlarsen commented 4 years ago

I've fixed two separate issues that I discovered as part of this:

github-actions[bot] commented 4 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.