-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[macOS] IWindowOverlayElement.Draw dirtyRect only returns initial Window Size. #21307
Comments
Is this a bug or feature @drasticactions, please? (I have noticed that you worked on #3351.) |
The answer is "Maybe" and "It depends". This is probably a bug, but I don't think it's a WindowOverlay bug, it's probably Maui.Graphics. First, It does react to window resizing. If it didn't, the graphic wouldn't be redrawn when you resized the window. Also, if you click on the "Add Adorner to Test Button" you would see that the Adorner (added to the VisualDiagnosticOverlay, driven by WindowOverlay) does add a adorner that does resize correctly on the screen. The actual implementation of WindowOverlay for handling the Graphics layer, I think, is fine, since it can draw fine when making the window size larger than it initially was, which could only happen if the actual UIView is pinned to the sides of the window. So the issue is that specific IWindowOverlayElement. It uses Moreover, if you switch that graphic to use the Window size itself, float centerX = (float)(_overlay.Window.Width - 50);
float centerY = (float)(_overlay.Window.Height - 50);
_circle = new Circle(centerX, centerY, 40); and resize it, the width and height of the window only go up to the max width and height of when it was created, so it will shrink but it won't grow if you make the window bigger. My guess is that these could be related, and the calculation of the canvas width and height is incorrect. But that's not a specific WindowOverlay API thing, that's part of Maui.Graphics. So I think that's the issue, but I'm not sure. As for it being a bug in WindowOverlay, IMO, no. You handle the location of where it's drawn on the screen, so that's working. The issue is getting the actual window size isn't working, but I'm not sure that's driven by the overlay. If you want to map to the size If you cast @mattleibow What do you think? |
Yes, it should work on Windows and Android. For the emoji, DrawString doesn't like the Emoji on Mac. That's also a SkiaSharp/Maui.Graphics thing. |
Description
I would expect the window overlay to redraw the overlay content when the container window is resized but it does not happen.
Steps to Reproduce
I would expect the overlay to redraw the overlay content but it does not happen.
Demo:
Screen.Recording.2024-03-19.at.14.49.38.mov
Link to public reproduction project repository
No response
Version with bug
8.0.7 SR2
Is this a regression from previous behavior?
No, this is something new
Last version that worked well
Unknown/Other
Affected platforms
macOS
Affected platform versions
Apple Mac M1 Sonoma 14.4
Did you find any workaround?
No.
Relevant log output
No response
The text was updated successfully, but these errors were encountered: