typora / typora-issues

Bugs, suggestions or free discussions about the minimal markdown editor — Typora
https://typora.io
1.53k stars 58 forks source link

Windows positioned with top or bottom of window slightly offscreen #5889

Open loopernow opened 10 months ago

loopernow commented 10 months ago

I've noticed that Typora, when opening the first or subsequent windows of a session, places the new windows too high or too low if the previous Typora window was positioned near the top or bottom of the screen, such that most or all of the titlebar is placed above 0 on the y axis, or a similarly small portion of the bottom of the window is placed below the bottommost pixels of the screen. Typora is placing these windows slightly offset from the position of whatever Typora window was open previously, but does not restrict window placement to within the bounds of the screen.

To Reproduce

  1. Open a Typora window and place it so its top edge is fairly close to the top of the screen, let's say within the top 5% or 10% of the screen height. Or place it such that its bottom edge is within the same percentage of the bottom of the screen.
  2. Open a new window with the File > New Window command.
  3. The window will be offset slightly from the first window.
  4. If necessary, repeat Step 2 until a new window is offset enough that it is placed with its top or bottom edge slightly offscreen.

Expected behavior All opened Typora windows should have all pixels within the bounds of the screen when Typora positions its own windows.

Desktop:

Typora Version 1.7.3

quinnhornblow commented 10 months ago

Assuming my problem is related to window positioning so not opening a new issue.

I often work on multiple monitors. I have found that if I have Typora open on my second monitor, close Typora, unplug my laptop, then reopen Typora later it appears hidden off screen. I've tried the solutions described here but none work. Typora is the only application where I've encountered this issue. Essentially, I cannot use Typora on my laptop unless it's connected to a second monitor.

Using version 1.7.6 on Windows 10.

loopernow commented 9 months ago

Assuming my problem is related to window positioning so not opening a new issue.

I often work on multiple monitors. I have found that if I have Typora open on my second monitor, close Typora, unplug my laptop, then reopen Typora later it appears hidden off screen. I've tried the solutions described here but none work. Typora is the only application where I've encountered this issue. Essentially, I cannot use Typora on my laptop unless it's connected to a second monitor.

Using version 1.7.6 on Windows 10.

@quinnhornblow This is not a solution to your problem, but a workaround (works with any program on Windows 10; not sure about Windows 11):

abnerlee commented 9 months ago

replates #2225

loopernow commented 9 months ago

replates #2225

@abnerlee The commenter @quinnhornblow describes an issue with his multi-monitor setup, but the issue I describe is on a single monitor. @quinnhornblow is describing a different issue.

abnerlee commented 8 months ago

Does 1.8.2-dev (https://typora.io/releases/dev) fixed this?

loopernow commented 8 months ago

Does 1.8.2-dev (https://typora.io/releases/dev) fixed this?

I would say technically it does, but introduces a new issue--it resizes subsequent windows without the user specifying to do so.

If you keep opening Windows Explorer windows, for example, it does not resize large windows to keep them within the bounds of the screen. Instead, it offsets them very slighly and if necessary runs them along the top edge of the screen.

image

Firefox does something similar.