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
1 pixel gap around window prevents mouse from interacting with control buttons (minimize, maximize, close) #7422
Comments
Repro notes: looks like it doesn't happen on 100% scale displays but it does on my 150 when I move it from my 100. |
Ah great thinking. My repro/screenshot comes from a 225% scaled 4K monitor. |
I'm now not seeing this in v 1.2.2381.0. Not sure if it's fixed, or whether the issue may be transient. |
Same problem here. The issue also exists for the tabs, see #8363. |
The weird part is that I am is exactly with the same setup, and cannot reproduce it no matter what 😊 |
I'm having this issue with a single 3440x1440 monitor with 100% scale. |
I was able to replicate this issue, and managed to "fix" it. If I maximise the window on my main monitor (LEFT, 3), all is well. If I maximise it on my secondary monitor (RIGHT, 2), the problem occurs. Scaling is set to 100% for both monitors. I found by "rearranging" monitor 2 to the same "height" as monitor 3, the Close button lights up now at the edge of both screens. |
I have 1920×1080 on display 1, 1920×1080 on display 3 (the main display), and 1280×1024 on display 2; 100% scale in each. It was very difficult to align the top edges of the displays just right in the Settings app, which tends to snap the bottom edges instead. I was finally able to do it by dragging display 2 above display 3 and then moving it with the arrow keys. I can now click Windows Terminal tabs on each display with no gap. If I move display 2 higher up, then displays 1 and 3 get a gap. So, I imagine something compares the top Y coordinate of the window to 0 and not to what is in MONITORINFO. |
I have something similar. My left two monitors have the gap, and the third monitor (which is portrait) does not have the gap. |
Okay, I finally found a configuration that works for me to repro this. For me, it's all three aligned exactly on the top, side-by-side. And it only repros on monitor 2. Weird. Investigation notes:It would seem the monitors aren't actually aligned. Monitors 1, 2, 3 are at y offsets of (0, 1, -2). interesting that maximizing works fine on 1 and 3, but not 2. Tracing from
That makes me think the window is getting the right size, but maybe the xaml island isn't? Curious. The drag bar can be clicked on the top pixel, even when the xaml elements can't. What the devil is going on here? Got it to repro with y-offsets of [0, 0, -60] as well. Maybe the right monitor just needs to be above it? The Interesting development: Teams experiences the same exact behavior. But Edgium, UWP OneNote, Sublime 4, even Hyper, none of those experience it. I wonder if we do need to keep the frame at least 1px big, even when maximized? |
Hope you can fix it. It's annoying to switch tabs and start typing commands only to find you didn't actually switch tabs. edit - I see exactly the same gap in Teams but only in a call. |
Okay, there's an absolute hack of a fix in 37fbeab. That's absolutely not right though. In that commit, I just move the xaml island up one pixel when we're maximized. That seems to allow the island to receive the mouse events we'd expect, but it definitely cuts off one pixel of the top of the tab row. IMO, it's not that bad, but I'd rather have the right solution. At this point I think I'm out of ideas. @greg904 has worked in this area of code before - any ideas what might be going on here? Also, @ocalvo and @Austin-Lamb do a lot of XAML Islands work, in case they've ever seen anything like this before. And lastly, @ekoschik because he knows these kinds of things in and out. |
Okay, I'm officially out of ideas now. The top pixel of the |
For inexplicable reasons, the top row of pixels on our tabs, new tab button, and caption buttons is totally unclickable. The mouse simply refuses to interact with them. So when we're maximized, on certain monitor configurations, this results in the top row of pixels not reacting to clicks at all. To obey Fitt's Law, we're gonna hackily shift the entire island up one pixel. That will result in the top row of pixels in the window actually being the _second_ row of pixels for those buttons, which will make them clickable. It's perhaps not the right fix, but it works. After discussion, we think this is a fine fix for this. We don't think anyone's going to miss the top row of pixels on the TabView. The original bug is painful enough for the subset of users it impacts that this is an acceptable trade. Should a better fix be found, we can absolutely do that instead. Closes #7422
For inexplicable reasons, the top row of pixels on our tabs, new tab button, and caption buttons is totally unclickable. The mouse simply refuses to interact with them. So when we're maximized, on certain monitor configurations, this results in the top row of pixels not reacting to clicks at all. To obey Fitt's Law, we're gonna hackily shift the entire island up one pixel. That will result in the top row of pixels in the window actually being the _second_ row of pixels for those buttons, which will make them clickable. It's perhaps not the right fix, but it works. After discussion, we think this is a fine fix for this. We don't think anyone's going to miss the top row of pixels on the TabView. The original bug is painful enough for the subset of users it impacts that this is an acceptable trade. Should a better fix be found, we can absolutely do that instead. Closes #7422
For inexplicable reasons, the top row of pixels on our tabs, new tab button, and caption buttons is totally unclickable. The mouse simply refuses to interact with them. So when we're maximized, on certain monitor configurations, this results in the top row of pixels not reacting to clicks at all. To obey Fitt's Law, we're gonna hackily shift the entire island up one pixel. That will result in the top row of pixels in the window actually being the _second_ row of pixels for those buttons, which will make them clickable. It's perhaps not the right fix, but it works. After discussion, we think this is a fine fix for this. We don't think anyone's going to miss the top row of pixels on the TabView. The original bug is painful enough for the subset of users it impacts that this is an acceptable trade. Should a better fix be found, we can absolutely do that instead. Closes #7422
🎉This issue was addressed in #10746, which has now been successfully released as Handy links: |
🎉This issue was addressed in #10746, which has now been successfully released as Handy links: |
Doing #10242 again. The space around the tabs was made equal in windowed mode. For maximized mode, I made the titlebar be 33px tall, to compensate for #10746. ![padding](https://user-images.githubusercontent.com/84711285/131723737-d63b015c-2134-465a-a15b-6b44538b95c5.png)
Environment
Steps to reproduce
Expected behavior
Correct/typical behavior (e.g. for File Explorer, Edge, UWP apps, etc...) is that the mouse interacts with the window control buttons (minimize, maximize, close) when touching the top edge of the screen, or the top right corner. Meaning, the mouse can be put into the very top right corner of the screen, and when clicking, the close button is engaged and the window closes. For the Windows Terminal, there seems to be a 1pixel "gap" along the top/sides of the window that prevents this from working.
Actual behavior
The close button does not go into a hover state with the mouse located there and the window does not close.
See example where mouse cursor is at top right corner of the screen but the close button is not "lit up" red:
I see this on some apps here and there -- Nitro PDF is another example.
The text was updated successfully, but these errors were encountered: