question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Redraw passed `bounds` bigger than its client area

See original GitHub issue

Describe the bug I’ve encountered this bug in developing #2258

After resizing a View in LayoutSubviews to be smaller then the subsequent redraw that is triggered is passing a larger Rect into Redraw than the bounds.

image

I think this issue is to do with view.NeedDisplay.Width being stale and the parent View passing the larger width/height of the two:

https://github.com/gui-cs/Terminal.Gui/blob/3d75be4ea60aa670544e39394b44adf6733a39df/Terminal.Gui/Core/View.cs#L1543-L1544

Surely a View should never be asked to redraw a bigger area than it currently occupies?

Or is this to do with menus/spill overs etc where a view deliberately paints outside the box? If so then I think quite a few of my views will need to be adjusted to only listen to Bounds and not the passed parameter bounds.

Issue Analytics

  • State:closed
  • Created 8 months ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
tznindcommented, Jan 28, 2023

No worries, I think its just a nuance of the way I am doing resizing as part of layout. I will close this as its been this way for over a year and hasn’t caused any problems in other use cases.

I can work around it I think.

0reactions
tznindcommented, Jan 29, 2023

In my opinion this change must be reverted and if you want you can reopen this issue.

Ok reopening, sounds like theres things that could be addressed 😃 .

Read more comments on GitHub >

github_iconTop Results From Across the Web

redraw the whole client area
Since a little bit i tried to add a grip to a window to resize it. I follow an example and it works...
Read more >
ScrollableControl Class (System.Windows.Forms)
When the control is sized smaller than the specified minimum size, or a child control is located outside the bounds of the control,...
Read more >
What Are Refresh Tokens and How to Use Them Securely
This post will explore the concept of refresh tokens as defined by OAuth 2.0. We will learn how they compare to other token...
Read more >
BrowserWindow
Only relevant for macOS, as other OSes allow larger-than-screen windows by default. ... the window's client area (e.g. the web page) to the...
Read more >
Place Autocomplete | Maps JavaScript API
bounds is a google.maps.LatLngBounds object specifying the area in which to search for places. The results are biased towards, but not restricted to,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found