Skip to content

Conversation

@iloveeclipse
Copy link
Member

Fixes #3087

@github-actions
Copy link
Contributor

github-actions bot commented Jul 7, 2025

Test Results

 2 778 files  ±0   2 778 suites  ±0   1h 41m 1s ⏱️ - 5m 36s
 7 930 tests ±0   7 702 ✅ ±0  228 💤 ±0  0 ❌ ±0 
23 345 runs  ±0  22 599 ✅ ±0  746 💤 ±0  0 ❌ ±0 

Results for commit 5c0b73d. ± Comparison against base commit d2177cf.

♻️ This comment has been updated with latest results.

@iloveeclipse
Copy link
Member Author

So should we

  1. return
  2. use new Point (e.width, e.height)
  3. Anything else?

I'm fine with return, at least on Linux it seem to work. However I don't have Mac and I would not like to test on Windows (need more time to setup environment).

So if @fedejeanne or @amartya4256 could test on other OS we can do what fits best.

@fedejeanne
Copy link
Member

I tested the current PR (calling return if the size is 0x0) and I saw no side effects on any OS (I tested for Mac and Linux at home). I propose we move on with this PR.

We can continue this discussion too if you want, but I'd like to have this fixed fast since I'm out of office the next 3 days and this PR fixes the regression.

Would you agree, @iloveeclipse and @amartya4256 ?

@amartya4256
Copy link
Contributor

I tested it out on both windows and linux and I do see no side effect of returning on if the size is 0. However, to avoid any unprecedented issue, I tested out with the following code and it seems the safest to me:

Point size = getSize();
Rectangle paintBounds = (size.x == 0 && size.y == 0) ? new Rectangle(e.x, e.y, e.width, e.height)
      : new Rectangle(0, 0, size.x, size.y);
repaint(gc, paintBounds.x, paintBounds.y, paintBounds.width, paintBounds.height);

@iloveeclipse
Copy link
Member Author

Interestingly, I've noticed while debugging the "bad" size of the FormText is only returned on fullscreen shells. If I minimize the window, no "zero" size is returned. Bug in GTK's implementation of FormText.getSize() or GTK3 bug?

@sratz
Copy link
Member

sratz commented Jul 7, 2025

Interestingly, I've noticed while debugging the "bad" size of the FormText is only returned on fullscreen shells. If I minimize the window, no "zero" size is returned. Bug in GTK's implementation of FormText.getSize() or GTK3 bug?

Hmm, we have about ~50 tests failing in our product due to this issue, but as far as I can tell none of them are using any fullscreen shells. Not really sure where exactly the (0,0) is coming from.

@fedejeanne
Copy link
Member

Not really sure where exactly the (0,0) is coming from.

#3087 (comment)

@fedejeanne
Copy link
Member

I still don't understand why is it better to try and paint something when the size is 0x0 but since the rest seems confident that this is the best approach, I see no point in opposing it.

I tested the current PR in Mac and I didn't see any side-effects. Feel free to merge as I'll be offline for most of the next 3 days.

Thank you all for the input and thank you @iloveeclipse for the prompt fix!

@iloveeclipse
Copy link
Member Author

I still don't understand why is it better to try and paint something when the size is 0x0

it is just defensive style - use whatever was working before to stay compatible.

@iloveeclipse
Copy link
Member Author

OK, I think we have a consensus. Let's merge.

@iloveeclipse iloveeclipse merged commit 323f79d into eclipse-platform:master Jul 7, 2025
11 checks passed
@iloveeclipse iloveeclipse deleted the issue_3087 branch July 7, 2025 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cheat Sheet view reports multiple errors on use

4 participants