brackets-archive / brackets-shell

CEF3-based application shell for Brackets.
http://brackets.io
MIT License
0 stars 0 forks source link

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

Open core-ai-bot opened 3 years ago

core-ai-bot commented 3 years ago

Issue by JeffryBooher Friday Jan 09, 2015 at 23:13 GMT Originally opened as https://github.com/adobe/brackets-shell/pull/498


FIxes the following issues:


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

core-ai-bot commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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


Merging.