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

[CLOSED] fixes initial placement, move and size issues #331

Open
core-ai-bot opened this issue Aug 17, 2021 · 9 comments
Open

[CLOSED] fixes initial placement, move and size issues #331

core-ai-bot opened this issue Aug 17, 2021 · 9 comments

Comments

@core-ai-bot
Copy link
Member

Issue by JeffryBooher
Friday Jan 09, 2015 at 23:13 GMT
Originally opened as adobe#498


FIxes the following issues:


JeffryBooher included the following code: https://github.com/adobe/brackets-shell/pull/498/commits

@core-ai-bot
Copy link
Member Author

Comment by JeffryBooher
Friday Jan 09, 2015 at 23:20 GMT


@redmunds do you mind taking a look when you have time? Thanks!

@core-ai-bot
Copy link
Member Author

Comment by redmunds
Saturday Jan 10, 2015 at 01:00 GMT


Found a weird case:

  1. Open Brackets in secondary monitor
  2. Maximize Brackets, then shutdown
  3. Restart Brackets

Results:
Brackets is opened in primary monitor. Note that I did not disconnect or move secondary monitor.

Then, if I Restore Brackets window size it switches back to secondary monitor!

@core-ai-bot
Copy link
Member Author

Comment by JeffryBooher
Saturday Jan 10, 2015 at 01:48 GMT


hmmmm...That is weird indeed. Not only that but it restores back to the secondary monitor which then maximizes back on the secondary monitor.

@core-ai-bot
Copy link
Member Author

Comment by redmunds
Monday Jan 12, 2015 at 22:31 GMT


Verified that this case is now fixed.

I also notice that Brackets window is moved from secondary monitor if it's disconnected while Brackets is running! Sweet.

@core-ai-bot
Copy link
Member Author

Comment by redmunds
Monday Jan 12, 2015 at 22:39 GMT


I noticed another case:

  1. Maximize Brackets on secondary monitor and close Brackets
  2. Disconnect secondary monitor and restart Brackets
  3. Brackets opens maximized in primary monitor as expected
  4. Now click Restore button

Results:
Brackets window becomes really small (390x200). Brackets is unusable as an editor, but you can still grab edges, make window bigger, and then everything works as expected.

Expected
Would be nice if Brackets remembered my previous Restore size (obviously it needs to be re-_position_ed). If that can't be remembered, then maybe default size (1000x700) can be used.

Not sure if this is worth fixing.

@core-ai-bot
Copy link
Member Author

Comment by JeffryBooher
Tuesday Jan 13, 2015 at 16:45 GMT


@redmunds regarding the issue you ran into with maximizing, disconnecting the monitor, restarting and clicking the restore button. In this case the Window is using CW_USEDEFAULT which lets Windows decide where to put the restored window. In some cases it's just using the minimum sizes which is 320x200. I could only reproduce this while running in the debugger so I rejiggered the logic so that we just don't set the restored window placement if it's off-screen which forces windows to just use CW_USEDEFAULT (which was passed in during initial window creation).

@core-ai-bot
Copy link
Member Author

Comment by redmunds
Tuesday Jan 13, 2015 at 19:59 GMT


@JeffryBooher This looks good on WIndows.

Have you verified that this doesn't break Mac build? I upgraded my Mac to Yosemite and can't build Brackets at the moment.

@core-ai-bot
Copy link
Member Author

Comment by JeffryBooher
Tuesday Jan 13, 2015 at 20:01 GMT


@redmunds this is only changing Windows project files -- it doesn't affect any cross platform code so I think we're safe on Mac.

@core-ai-bot
Copy link
Member Author

Comment by redmunds
Tuesday Jan 13, 2015 at 20:02 GMT


Merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant