Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

use 10.7 needsLayout property #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

use 10.7 needsLayout property #1

wants to merge 1 commit into from

Conversation

rmottola
Copy link
Member

@rmottola rmottola commented Jan 9, 2025

try to get rid of local IVAR which now duplicates NSView

@rmottola
Copy link
Member Author

rmottola commented Jan 9, 2025

@fredkiefer this seems to mostly work. What do you think?
I notice that after redraw (e.g. windows resize, mouse over) it may enter an endless relayout loop. SOmetimes however it just relayouts once or twice.

Due to this change? I don't know, things didn't compile for years...

@rmottola
Copy link
Member Author

I made a separate change where I renamed the local ivar instead to avoid clash and that one works better (see: https://github.com/gnustep/libs-simplewebkit/tree/avoid_ivarclash).

The main difference between the two branches is that by using GS needsLayout, a relayout is triggered by just a mouse-over on the View. Do you think that is correct, @fredkiefer ? seems overkill

@@ -733,7 +733,7 @@ - (void) layout;
#if 0
NSLog(@"%@ %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd));
#endif
_needsLayout=NO;
[super setNeedsLayout: NO];
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fredkiefer checking the super implementation here:
https://github.com/gnustep/libs-gui/blob/f63f89dd050d6bf47c9fbd0fa36b4e81fbbb615b/Source/NSView.m#L5195

means this will not work, since it will skip NO.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant