digitalcreations / MaxTo

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

Question: Save And Restore Positions On Windows 10 Virtual Desktop #91

Open enone opened 9 years ago

enone commented 9 years ago

Hi! This Is Not A Bug But A Request I Suppose...

Well We Are On 2015 And Microsoft Forgot To Include A Simply Feauture Already Present In Mac OSX!

I'll Like That My Programs When I Restart Windows Will Be Reopened In The Same Virtual Desktop I Keep Them Running...

It's Incredible I Must Every Time I Restart My PC ...Move Them Over And Over In The Correct Virtual Desktop I Want!

I'll Revert Back To Single Desktop Mode... If I Don't Find A Nice Solution To This Problem...

Thanks And Keep Up!

glat commented 9 years ago

+1

I'd like this feature, also. I'm using a different utlity to do this, but it does not work right and there're no other good utilities. See http://www.stefandidak.com/windows-layout-manager/ to get it.

vegardlarsen commented 9 years ago

I like the idea of this feature, but there are a few things to think about here.

The case here is mainly when Windows re-opens apps you had open previously after a reboot? How often does that happen?

Then comes the issue of the technical feasibility of this. I have at the moment no idea what the possible entry points are for controlling this. Most likely one would have to use a CBTHook to subclass the window when it is opened. At the moment, MaxTo delays subclassing until it has checked if a window is on its compatibility list. By the time we subclass, it will be too late for it to grab e.g. the first mouse move event. The same will be the case here.

enone commented 9 years ago

Thanks For The Answer Andreas...

Basically The Concept Behind My Ideas Is That: ....What I See In My Monitor Then ...The Computer Can Remember For Me...

Our PCs Can Restart For A Lot Of Reasons Like (but not limited to):

In All These Situations, Where Is Impossible To Put PC In Hibernation/Standby Since The Shutdown Is Almost Instant, It Will Be Really Nice That Your Tool Monitor In Real-Time The Positions Of All Visible Windows And Save Them In A "snapshot" Like File... Maybe Every 10 Minutes An Auto-Save Of This "Windows Position" Snapshot...

Then When A Reboot Occur, On Next Restart, It Search For A "Last Working Snapshot" And If Present... When I Start An Application It Match "filename.exe" And Position Then It Put It In The Correct Desktop With The Correct Dimensions...

About Your Questions I Suggest You To Simply Use The Logic ....For Example: Case 1) Let The User Choose How To Restore Windows App In Program Configuration; Case 2) If User Have Not Yet Specified Any Options On How To Restore Windows App

First Reopen Them In Last Saved Position e/o Virtual Desktop (if snapshot exist) Second Open Them In Current Active Desktop (as actually it is)

I Don't Know Technically How To Achieve It Since I'm Not A Programmer, I've See That It's Possible To "Grab" Coordinates Of Any Opened Windows In The Form (top left:bottom right)

I Can Also Suppose That Microsoft Have Made Some SDK Or MSDN Guide On How To Access The New Virtual Desktop Functionality And Play With Them... At Least I Hope So!

I Also Know That's A Challenge! Maybe For This Microsoft Never Tried To Achieve This... It's Really Difficult! :D

Later... And Keep Up...

Il 2015-08-10 14.25, Vegard Andreas Larsen ha scritto:

I like the idea of this feature, but there are a few things to think about here.

  • Many apps are natural to use on multiple desktops at once (e.g. your web browser).
  • Some apps are unclear. Opening a new Word window by double-clicking on a document should open a window on the virtual desktop you are currently at? Or should it remember where you opened that document last? If that is the case, how do we identify that Word window by the open document?

The case here is mainly when Windows re-opens apps you had open previously after a reboot? How often does that happen?

Then comes the issue of the technical feasibility of this. I have at the moment no idea what the possible entry points are for controlling this. Most likely one would have to use a |CBTHook| to subclass the window when it is opened. At the moment, MaxTo delays subclassing until it has checked if a window is on its compatibility list. By the time we subclass, it will be too late for it to grab e.g. the first mouse move event. The same will be the case here.

— Reply to this email directly or view it on GitHub https://github.com/digitalcreations/MaxTo/issues/91#issuecomment-129426386.

vegardlarsen commented 9 years ago

Even though this is a feature I'd like to see myself, I believe it to be impossible (well) to do today. Therefore, I am closing this issue unless I get new information.

lennartb- commented 7 years ago

It seems that Microsoft has added some functionality to work with virtual desktops, maybe that would help? https://blogs.msdn.microsoft.com/winsdk/2015/09/10/virtual-desktop-switching-in-windows-10/

vegardlarsen commented 7 years ago

This solves the technical issue of moving windows, which is a big part of it. However, there is the perpetual problem of how do you detect that a windows is "the same" as it was before a reboot.

Say that you have a Word document open. There are a few ways you can identify that window:

No matter how you combine these possible identifiers would result in mis-identifying quite a few windows. This is the main reason I this is a hard problem to solve.

Any ideas here would be appreciated; solving this identification problem would go a long way towards solving other issues in MaxTo.

leedave commented 7 years ago

I'd really love such a feature. Currently all OS developers are implementing a lot of annoying "features", like menus that keep reloading and changing scroll positions or Windows that start snapping into pre-defined positions.

Personally I have different window arrangements I set up for different situations. Usually using a Virtual Desktop for each. It takes quite some time to get everything right after a reboot. It would be nice if you could somehow save Window configurations and load them on demand.

K-rnivoro commented 7 years ago

I use three monitors and three virtual desktop (so, nine different screens). In every desktop I have different related things: Work, 3D Printing, Hobbies. I hate rebooting because of loosing virtual desktops. I'd kill for havine the chance to keep everything in place, even if I have to remember "Saving" it every an hour or two.

geotay commented 7 years ago

Both are doable in macOS, and have been for a while through first and third party software. I love that whether I shut down on purpose or not, macOS will open right back into the same state last auto-saved by the system. I wish someone would get it figured out in Windows. But I'd just be happy having some way to set which vdesktop I want an application to open on and remember the position on that vdesktop. Of course, include an option for applications to show on every desktop. These are both keeping me from moving back to the Windows platform.

That's what brought me here. Searching for a Windows method to accomplish it. But I hadn't heard of MaxTo before and will be giving it a try for what it can do. I wish quality software that served specific needs was as easy for Windows as macOS. I've put hours in a few times a month for months looking for a better Windows 10 window manager as well.

masaeedu commented 6 years ago

Perhaps you could have a CLI like maxto that you could use to start up the applications with specific positions. Then the user could write a script that does multiple invocations of maxto -vdesktop 1 -position topleft code.exe ... or something and set that up to run on login.

vegardlarsen commented 6 years ago

Don't tell anyone:

image

This is coming. :)

K-rnivoro commented 6 years ago

Is it? I can't wait!!

El 7 nov. 2017 12:00, "Vegard Andreas Larsen" notifications@github.com escribió:

Don't tell anyone:

[image: image] https://user-images.githubusercontent.com/436508/32500100-aaeecf7e-c3d4-11e7-9832-1769047edc57.png

This is coming. :)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/digitalcreations/MaxTo/issues/91#issuecomment-342508840, or mute the thread https://github.com/notifications/unsubscribe-auth/AacoqJTjsU-nDalh8RFrECX-wgjHUigEks5s0HB3gaJpZM4FoEf9 .

amonkhepri commented 6 years ago

How far away is it now?

chanshrestha commented 6 years ago

Any updates on MaxTo.CLI? I really need this @vegardlarsen

vegardlarsen commented 6 years ago

Alpha released yesterday. Check here.

thewavelength commented 5 years ago

@vegardlarsen How do I access this feature? I am using the beta from January 25, 2019.

Even using a single virtual desktop only, positions of Windows are not saved. E. g. I close Foxit PDF Reader, reopen it five seconds later and its position is not restored.

vegardlarsen commented 5 years ago

@thewavelength Apparently I haven't been clear enough about this before: I don't think this is possible to do well enough that this will become a feature of MaxTo (I would love to be proven wrong on this).

The issue is as I outlined above, you can't know that "this window" is the same as "that window". This means that you wouldn't know where to put windows as they start up; because you would have to guess at which window is this most similar to that I have seen before. E.g. would a "Word - Document1.docx" window be treated the same as "Word - Document2.docx", or is it a completely new window? What if you had both open when the machine crashed, and they were placed side-by-side?

thewavelength commented 5 years ago

Now I understand the thread... Your mentioning of the Alpha was regarding the CLI, not regarding the virtual desktop positioning stuff. A bit confusing :-D

I totally understand the underlyingi ssue. Maybe it would be feasible solving something like this using custom written code (e. g. using/embedding CSScript). If you think this might be something, I can create a feature request to track this idea. If you think this will make MaxTo too complicated, I can totally understand it. Let me know.

vegardlarsen commented 5 years ago

I am not sure that I want to add scripting in that manner, at least not at this point. It would likely require quite a bit of work that we do not have the resources for currently. Lots of MaxTo customers are programmers, so I am not worried about adding complexity too much.

vegardlarsen commented 4 years ago

I am re-opening this because I've had a good discussion with a customer via e-mail regarding how this could work. This really got me thinking about how this could be done, and I think that we can do this in a somewhat useful way. Basically, we could construct an identifier using 3 properties: <process_name>-<window_class>-<window_title>. If we can't find an exact match, we find the most recently set item that just matches the <process_name>-<window_class> prefix. So we'd either open a specific document where it was the last time, or we'd open a previously unseen document in the position we last had any document open.

I can't say when this will be done, but I really think this can be implemented.

pjerem commented 4 years ago

Hello @vegardlarsen, is this going to be in 2.1 ? Maybe as an experimental feature ?

vegardlarsen commented 4 years ago

@pjerem I am not sure. We already have a long list of items going into 2.1.

gazialankus commented 4 years ago

I just found about MaxTo through a google search because I want sticky notes to stay in their virtual desktops after reboot.

If you get sticky notes to stay where they were after a reboot, and similarly do a decent job in placing windows of apps that started with windows startup, I will switch to MaxTo.

I think you can differentiate between processes that started automatically upon startup vs. processes that the user started manually. For the former you can place them where you last see them, keeping track of them with the id scheme you mentioned.