Skip to content
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

Find/replace overlay: react to target relocation instead of paint events #2253

Conversation

HeikoKlare
Copy link
Contributor

@HeikoKlare HeikoKlare commented Sep 7, 2024

The FindReplaceOverlay currently registers a paint listener to the target in order to reposition itself upon move or resize events of the parent (paint events subsume resize and move events). This has two drawbacks:

  1. The update is performed too often, as paint events happen more often than move or resize events.
  2. Due to limitations in Wayland, repositioning the overlay does not work there. A combination of processed repaint events and failing position updates even leads to the shell contents moving out of the shell.

This change replaces the repaint listener with a move and resize listener. In consequence, less (unnecessary) updates of the overlay's position and size are executed and on Wayland at least the shell contents do not move out of the window anymore.

Contributes to eclipse-platform/eclipse.platform.swt#1447

Behavior on Wayland

This change does not resolve the location problem of the overlay when using Wayland. That issue is not specific for the overlay but affect all shells/dialogs. It only works towards its contents not vanishing, thus improving usability of the overlay, even though its location is wrong.

Before change:
Peek 2024-09-07 11-08

After change:
Peek 2024-09-07 11-13

Copy link
Contributor

github-actions bot commented Sep 7, 2024

Test Results

 1 815 files  ±0   1 815 suites  ±0   1h 29m 1s ⏱️ - 5m 57s
 7 697 tests ±0   7 469 ✅ ±0  228 💤 ±0  0 ❌ ±0 
24 252 runs  ±0  23 503 ✅ ±0  749 💤 ±0  0 ❌ ±0 

Results for commit 2f42b4d. ± Comparison against base commit 6368b06.

♻️ This comment has been updated with latest results.

@HeikoKlare HeikoKlare force-pushed the findreplace-target-relocation-improvement branch 2 times, most recently from f91fff7 to 4b64221 Compare September 8, 2024 18:46
@HeikoKlare HeikoKlare marked this pull request as ready for review September 8, 2024 19:50
The FindReplaceOverlay currently registers a paint listener to the target
in order to reposition itself upon move or resize events of the parent
(paint events subsume resize and move events). This has two drawbacks:
1. The update is performed too often, as paint events happen more often
than move or resize events
2. Due to limitations in Wayland, repositioning the overlay does not
work there. A combination of processed repaint events and failing
position updates even leads to the shell contents moving out of the
shell.

This change replaces the repaint listener with a move and resize
listener. In consequence, less (unnecessary) updates of the overlay's
position and size are executed and on Wayland at least the shell
contents do not move out of the window anymore.

Contributes to
eclipse-platform/eclipse.platform.swt#1447
@HeikoKlare HeikoKlare force-pushed the findreplace-target-relocation-improvement branch from 4b64221 to 2f42b4d Compare September 12, 2024 11:41
@HeikoKlare HeikoKlare merged commit 52470ac into eclipse-platform:master Sep 12, 2024
16 checks passed
@HeikoKlare HeikoKlare deleted the findreplace-target-relocation-improvement branch September 12, 2024 18:50
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.

1 participant