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

New find/replace overlay broken under wayland #1447

Closed
Tracked by #2021
akurtakov opened this issue Sep 5, 2024 · 6 comments · Fixed by eclipse-platform/eclipse.platform.ui#2254
Closed
Tracked by #2021
Labels
bug Something isn't working Linux/GTK Happens on Linux Wayland

Comments

@akurtakov
Copy link
Member

Trying to use new find/replace under Wayland is almost entirely impossible, It constantly moves and hides. Just watch the video

Screencast.from.2024-09-05.15-02-10.mp4

Environment:

  1. Select the platform(s) on which the behavior is seen:
    • [x ] Linux
  1. Additional OS info (e.g. OS version, Linux Desktop, etc)
    Fedora 40, Gnome on Wayland

  2. JRE/JDK version
    Java 23

@akurtakov
Copy link
Member Author

akurtakov commented Sep 5, 2024

@jonahgraham @sratz That might be interesting for the IDE WG to look into as it will be a problem for users on latest Linux distros

@HeikoKlare
Copy link
Contributor

I quickly reproduced the issue on WSL using Wayland. At least one reason seems to be this:

Setting the shell's location (the one of the find/replace overlay shell) does not work, as also documented here: #790 (comment)
But the find/replace overlay implementation relies on this.

This means, the GTK Shell implementation does not behave API-conforming on Wayland. Isn't this an issue also in other use cases?
And just out of curiosity: Is there a reason for not adding a (temporary) comment to Shell's API that the method will not work on Wayland, given that this issue is known for quite some time now and given that we seem to want / claim SWT to be usable on Wayland?

@HeikoKlare
Copy link
Contributor

We show a notification popup to users on first usage of the find/replace overlay to switch back to the existing find/replace dialog. This would give them the chance to easily switch to existing UI (they can of course still switch the UI in the preferences later on).
Unfortunately, this notification popup does also not work properly because of the same issue. Popups also use the Shell#setLocation() functionality: https://github.com/eclipse-platform/eclipse.platform.ui/blob/31a902749e53ae095fb98c40459ba8cfc70d6d0d/bundles/org.eclipse.jface.notifications/src/org/eclipse/jface/notifications/AbstractNotificationPopup.java#L422-L423

HeikoKlare added a commit to HeikoKlare/eclipse.platform.ui that referenced this issue Sep 7, 2024
The FindReplaceOverlay currents 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 added a commit to HeikoKlare/eclipse.platform.ui that referenced this issue Sep 7, 2024
The FindReplaceOverlay currents 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 added a commit to HeikoKlare/eclipse.platform.ui that referenced this issue 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
HeikoKlare added a commit to HeikoKlare/eclipse.platform.ui that referenced this issue Sep 7, 2024
…-platform#2099

The FindReplaceOverlay is currently realized as a separate shell (more
precisely, a JFace Dialog), which is placed at a proper position on top
of the workbench shell. This has some drawback:
- It has to manually adapt to movements of the parent shell or the
target part/widget
- It has to manually hide and show depending on visibility changes of
the target part/widget
- It does not follow events of the target immediately, i.e., movements
are always some milliseconds behind, minimize/maximize
operations/animations are not synchronous etc.
- It does not locate properly when the platform uses Wayland, as manual
shell positioning is not possible there.

This change replaces the dialog-based implementation of the
FindReplaceOverlay with an in-place composite-based implementation. A
composite is created in the target widget and placed relative to this
composite. In consequence, the overlay automatically follows all move,
resize, hide/show operations of the target widget.

Fixes eclipse-platform/eclipse.platform.swt#1447

Fixes eclipse-platform#2099
HeikoKlare added a commit to HeikoKlare/eclipse.platform.ui that referenced this issue 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
HeikoKlare added a commit to HeikoKlare/eclipse.platform.ui that referenced this issue Sep 8, 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
HeikoKlare added a commit to HeikoKlare/eclipse.platform.ui that referenced this issue Sep 8, 2024
…-platform#2099

The FindReplaceOverlay is currently realized as a separate shell (more
precisely, a JFace Dialog), which is placed at a proper position on top
of the workbench shell. This has some drawback:
- It has to manually adapt to movements of the parent shell or the
target part/widget
- It has to manually hide and show depending on visibility changes of
the target part/widget
- It does not follow events of the target immediately, i.e., movements
are always some milliseconds behind, minimize/maximize
operations/animations are not synchronous etc.
- It does not locate properly when the platform uses Wayland, as manual
shell positioning is not possible there.

This change replaces the dialog-based implementation of the
FindReplaceOverlay with an in-place composite-based implementation. A
composite is created in the target widget and placed relative to this
composite. In consequence, the overlay automatically follows all move,
resize, hide/show operations of the target widget.

Fixes eclipse-platform/eclipse.platform.swt#1447

Fixes eclipse-platform#2099
HeikoKlare added a commit to HeikoKlare/eclipse.platform.ui that referenced this issue Sep 9, 2024
…-platform#2099

The FindReplaceOverlay is currently realized as a separate shell (more
precisely, a JFace Dialog), which is placed at a proper position on top
of the workbench shell. This has some drawback:
- It has to manually adapt to movements of the parent shell or the
target part/widget
- It has to manually hide and show depending on visibility changes of
the target part/widget
- It does not follow events of the target immediately, i.e., movements
are always some milliseconds behind, minimize/maximize
operations/animations are not synchronous etc.
- It does not locate properly when the platform uses Wayland, as manual
shell positioning is not possible there.

This change replaces the dialog-based implementation of the
FindReplaceOverlay with an in-place composite-based implementation. A
composite is created in the target widget and placed relative to this
composite. In consequence, the overlay automatically follows all move,
resize, hide/show operations of the target widget.

Fixes eclipse-platform/eclipse.platform.swt#1447

Fixes eclipse-platform#2099
HeikoKlare added a commit to HeikoKlare/eclipse.platform.ui that referenced this issue Sep 11, 2024
…-platform#2099

The FindReplaceOverlay is currently realized as a separate shell (more
precisely, a JFace Dialog), which is placed at a proper position on top
of the workbench shell. This has some drawback:
- It has to manually adapt to movements of the parent shell or the
target part/widget
- It has to manually hide and show depending on visibility changes of
the target part/widget
- It does not follow events of the target immediately, i.e., movements
are always some milliseconds behind, minimize/maximize
operations/animations are not synchronous etc.
- It does not locate properly when the platform uses Wayland, as manual
shell positioning is not possible there

This change replaces the dialog-based implementation of the
FindReplaceOverlay with an in-place composite-based implementation. A
composite is created in the target widget and placed relative to this
composite. In consequence, the overlay automatically follows all move,
resize, hide/show operations of the target widget.

Fixes eclipse-platform/eclipse.platform.swt#1447

Fixes eclipse-platform#2099
HeikoKlare added a commit to HeikoKlare/eclipse.platform.ui that referenced this issue Sep 12, 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
HeikoKlare added a commit to eclipse-platform/eclipse.platform.ui that referenced this issue Sep 12, 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
HeikoKlare added a commit to HeikoKlare/eclipse.platform.ui that referenced this issue Sep 16, 2024
…-platform#2099

The FindReplaceOverlay is currently realized as a separate shell (more
precisely, a JFace Dialog), which is placed at a proper position on top
of the workbench shell. This has some drawback:
- It has to manually adapt to movements of the parent shell or the
target part/widget
- It has to manually hide and show depending on visibility changes of
the target part/widget
- It does not follow events of the target immediately, i.e., movements
are always some milliseconds behind, minimize/maximize
operations/animations are not synchronous etc.
- It does not locate properly when the platform uses Wayland, as manual
shell positioning is not possible there.

This change replaces the dialog-based implementation of the
FindReplaceOverlay with an in-place composite-based implementation. A
composite is created in the target widget and placed relative to this
composite. In consequence, the overlay automatically follows all move,
resize, hide/show operations of the target widget.

Fixes eclipse-platform/eclipse.platform.swt#1447

Fixes eclipse-platform#2099
HeikoKlare added a commit to HeikoKlare/eclipse.platform.ui that referenced this issue Sep 16, 2024
…-platform#2099

The FindReplaceOverlay is currently realized as a separate shell (more
precisely, a JFace Dialog), which is placed at a proper position on top
of the workbench shell. This has some drawback:
- It has to manually adapt to movements of the parent shell or the
target part/widget
- It has to manually hide and show depending on visibility changes of
the target part/widget
- It does not follow events of the target immediately, i.e., movements
are always some milliseconds behind, minimize/maximize
operations/animations are not synchronous etc.
- It does not locate properly when the platform uses Wayland, as manual
shell positioning is not possible there

This change replaces the dialog-based implementation of the
FindReplaceOverlay with an in-place composite-based implementation. A
composite is created in the target widget and placed relative to this
composite. In consequence, the overlay automatically follows all move,
resize, hide/show operations of the target widget.

Fixes eclipse-platform/eclipse.platform.swt#1447

Fixes eclipse-platform#2099
@tfonda-fbk
Copy link

tfonda-fbk commented Sep 27, 2024

For anyone facing this, the workaround mentioned by Heiko is to open Preferences > General > Editors > Text editors and untick "Use find/replace overlay".
@HeikoKlare thanks for fixing this issue. May I ask if I will receive the fix as a software update via the 2024-09 update site, or if I have to wait a few months for the next Eclipse release to get it?
Never mind, I thought the PR had already been merged, but it has not. I'll stick to the workaround. Thanks again!

@merks
Copy link
Contributor

merks commented Sep 27, 2024

FYI, you can update from

https://download.eclipse.org/eclipse/updates/4.34-I-builds/

Also, after M1 is completed next week Thursday morning you can update from

https://download.eclipse.org/releases/milestone/

Of course these things will update many things to current development-in-progress versions which you may not desire.

@HeikoKlare
Copy link
Contributor

In M1, the overlay should not be as broken as before when using Wayland anymore. The contents should not "disappear" / move out of the window anymore, but still the overlay itself will be misplaced. I hope that I can soon find a solution for the remaining issues of the PR to completely fix it (eclipse-platform/eclipse.platform.ui#2254).

HeikoKlare added a commit to HeikoKlare/eclipse.platform.ui that referenced this issue Sep 28, 2024
…-platform#2099

The FindReplaceOverlay is currently realized as a separate shell (more
precisely, a JFace Dialog), which is placed at a proper position on top
of the workbench shell. This has some drawback:
- It has to manually adapt to movements of the parent shell or the
target part/widget
- It has to manually hide and show depending on visibility changes of
the target part/widget
- It does not follow events of the target immediately, i.e., movements
are always some milliseconds behind, minimize/maximize
operations/animations are not synchronous etc.
- It does not locate properly when the platform uses Wayland, as manual
shell positioning is not possible there

This change replaces the dialog-based implementation of the
FindReplaceOverlay with an in-place composite-based implementation. A
composite is created in the target widget and placed relative to this
composite. In consequence, the overlay automatically follows all move,
resize, hide/show operations of the target widget.

Fixes eclipse-platform/eclipse.platform.swt#1447

Fixes eclipse-platform#2099
HeikoKlare added a commit to HeikoKlare/eclipse.platform.ui that referenced this issue Sep 28, 2024
…-platform#2099

The FindReplaceOverlay is currently realized as a separate shell (more
precisely, a JFace Dialog), which is placed at a proper position on top
of the workbench shell. This has some drawback:
- It has to manually adapt to movements of the parent shell or the
target part/widget
- It has to manually hide and show depending on visibility changes of
the target part/widget
- It does not follow events of the target immediately, i.e., movements
are always some milliseconds behind, minimize/maximize
operations/animations are not synchronous etc.
- It does not locate properly when the platform uses Wayland, as manual
shell positioning is not possible there

This change replaces the dialog-based implementation of the
FindReplaceOverlay with an in-place composite-based implementation. A
composite is created in the target widget and placed relative to this
composite. In consequence, the overlay automatically follows all move,
resize, hide/show operations of the target widget.

Fixes eclipse-platform/eclipse.platform.swt#1447

Fixes eclipse-platform#2099
HeikoKlare added a commit to HeikoKlare/eclipse.platform.ui that referenced this issue Oct 1, 2024
…-platform#2099

The FindReplaceOverlay is currently realized as a separate shell (more
precisely, a JFace Dialog), which is placed at a proper position on top
of the workbench shell. This has some drawback:
- It has to manually adapt to movements of the parent shell or the
target part/widget
- It has to manually hide and show depending on visibility changes of
the target part/widget
- It does not follow events of the target immediately, i.e., movements
are always some milliseconds behind, minimize/maximize
operations/animations are not synchronous etc.
- It does not locate properly when the platform uses Wayland, as manual
shell positioning is not possible there

This change replaces the dialog-based implementation of the
FindReplaceOverlay with an in-place composite-based implementation. A
composite is created in the target widget and placed relative to this
composite. In consequence, the overlay automatically follows all move,
resize, hide/show operations of the target widget.

Fixes eclipse-platform/eclipse.platform.swt#1447

Fixes eclipse-platform#2099
HeikoKlare added a commit to HeikoKlare/eclipse.platform.ui that referenced this issue Oct 2, 2024
…-platform#2099

The FindReplaceOverlay is currently realized as a separate shell (more
precisely, a JFace Dialog), which is placed at a proper position on top
of the workbench shell. This has some drawback:
- It has to manually adapt to movements of the parent shell or the
target part/widget
- It has to manually hide and show depending on visibility changes of
the target part/widget
- It does not follow events of the target immediately, i.e., movements
are always some milliseconds behind, minimize/maximize
operations/animations are not synchronous etc.
- It does not locate properly when the platform uses Wayland, as manual
shell positioning is not possible there

This change replaces the dialog-based implementation of the
FindReplaceOverlay with an in-place composite-based implementation. A
composite is created in the target widget and placed relative to this
composite. In consequence, the overlay automatically follows all move,
resize, hide/show operations of the target widget.

Fixes eclipse-platform/eclipse.platform.swt#1447

Fixes eclipse-platform#2099
HeikoKlare added a commit to HeikoKlare/eclipse.platform.ui that referenced this issue Oct 2, 2024
…-platform#2099

The FindReplaceOverlay is currently realized as a separate shell (more
precisely, a JFace Dialog), which is placed at a proper position on top
of the workbench shell. This has some drawback:
- It has to manually adapt to movements of the parent shell or the
target part/widget
- It has to manually hide and show depending on visibility changes of
the target part/widget
- It does not follow events of the target immediately, i.e., movements
are always some milliseconds behind, minimize/maximize
operations/animations are not synchronous etc.
- It does not locate properly when the platform uses Wayland, as manual
shell positioning is not possible there

This change replaces the dialog-based implementation of the
FindReplaceOverlay with an in-place composite-based implementation. A
composite is created in the target widget and placed relative to this
composite. In consequence, the overlay automatically follows all move,
resize, hide/show operations of the target widget.

Fixes eclipse-platform/eclipse.platform.swt#1447

Fixes eclipse-platform#2099
HeikoKlare added a commit to HeikoKlare/eclipse.platform.ui that referenced this issue Oct 2, 2024
…-platform#2099

The FindReplaceOverlay is currently realized as a separate shell (more
precisely, a JFace Dialog), which is placed at a proper position on top
of the workbench shell. This has some drawback:
- It has to manually adapt to movements of the parent shell or the
target part/widget
- It has to manually hide and show depending on visibility changes of
the target part/widget
- It does not follow events of the target immediately, i.e., movements
are always some milliseconds behind, minimize/maximize
operations/animations are not synchronous etc.
- It does not locate properly when the platform uses Wayland, as manual
shell positioning is not possible there

This change replaces the dialog-based implementation of the
FindReplaceOverlay with an in-place composite-based implementation. A
composite is created in the target widget and placed relative to this
composite. In consequence, the overlay automatically follows all move,
resize, hide/show operations of the target widget.

Fixes eclipse-platform/eclipse.platform.swt#1447

Fixes eclipse-platform#2099
HeikoKlare added a commit to HeikoKlare/eclipse.platform.ui that referenced this issue Oct 2, 2024
…-platform#2099

The FindReplaceOverlay is currently realized as a separate shell (more
precisely, a JFace Dialog), which is placed at a proper position on top
of the workbench shell. This has some drawback:
- It has to manually adapt to movements of the parent shell or the
target part/widget
- It has to manually hide and show depending on visibility changes of
the target part/widget
- It does not follow events of the target immediately, i.e., movements
are always some milliseconds behind, minimize/maximize
operations/animations are not synchronous etc.
- It does not locate properly when the platform uses Wayland, as manual
shell positioning is not possible there

This change replaces the dialog-based implementation of the
FindReplaceOverlay with an in-place composite-based implementation. A
composite is created in the target widget and placed relative to this
composite. In consequence, the overlay automatically follows all move,
resize, hide/show operations of the target widget.

Fixes eclipse-platform/eclipse.platform.swt#1447

Fixes eclipse-platform#2099
HeikoKlare added a commit to HeikoKlare/eclipse.platform.ui that referenced this issue Oct 2, 2024
…-platform#2099

The FindReplaceOverlay is currently realized as a separate shell (more
precisely, a JFace Dialog), which is placed at a proper position on top
of the workbench shell. This has some drawback:
- It has to manually adapt to movements of the parent shell or the
target part/widget
- It has to manually hide and show depending on visibility changes of
the target part/widget
- It does not follow events of the target immediately, i.e., movements
are always some milliseconds behind, minimize/maximize
operations/animations are not synchronous etc.
- It does not locate properly when the platform uses Wayland, as manual
shell positioning is not possible there

This change replaces the dialog-based implementation of the
FindReplaceOverlay with an in-place composite-based implementation. A
composite is created in the target widget and placed relative to this
composite. In consequence, the overlay automatically follows all move,
resize, hide/show operations of the target widget.

Fixes eclipse-platform/eclipse.platform.swt#1447

Fixes eclipse-platform#2099
HeikoKlare added a commit to HeikoKlare/eclipse.platform.ui that referenced this issue Oct 3, 2024
…-platform#2099

The FindReplaceOverlay is currently realized as a separate shell (more
precisely, a JFace Dialog), which is placed at a proper position on top
of the workbench shell. This has some drawback:
- It has to manually adapt to movements of the parent shell or the
target part/widget
- It has to manually hide and show depending on visibility changes of
the target part/widget
- It does not follow events of the target immediately, i.e., movements
are always some milliseconds behind, minimize/maximize
operations/animations are not synchronous etc.
- It does not locate properly when the platform uses Wayland, as manual
shell positioning is not possible there

This change replaces the dialog-based implementation of the
FindReplaceOverlay with an in-place composite-based implementation. A
composite is created in the target widget and placed relative to this
composite. In consequence, the overlay automatically follows all move,
resize, hide/show operations of the target widget.

Fixes eclipse-platform/eclipse.platform.swt#1447

Fixes eclipse-platform#2099
HeikoKlare added a commit to HeikoKlare/eclipse.platform.ui that referenced this issue Oct 3, 2024
…-platform#2099

The FindReplaceOverlay is currently realized as a separate shell (more
precisely, a JFace Dialog), which is placed at a proper position on top
of the workbench shell. This has some drawback:
- It has to manually adapt to movements of the parent shell or the
target part/widget
- It has to manually hide and show depending on visibility changes of
the target part/widget
- It does not follow events of the target immediately, i.e., movements
are always some milliseconds behind, minimize/maximize
operations/animations are not synchronous etc.
- It does not locate properly when the platform uses Wayland, as manual
shell positioning is not possible there

This change replaces the dialog-based implementation of the
FindReplaceOverlay with an in-place composite-based implementation. A
composite is created in the target widget and placed relative to this
composite. In consequence, the overlay automatically follows all move,
resize, hide/show operations of the target widget.

Fixes eclipse-platform/eclipse.platform.swt#1447

Fixes eclipse-platform#2099
HeikoKlare added a commit to HeikoKlare/eclipse.platform.ui that referenced this issue Oct 3, 2024
…-platform#2099

The FindReplaceOverlay is currently realized as a separate shell (more
precisely, a JFace Dialog), which is placed at a proper position on top
of the workbench shell. This has some drawback:
- It has to manually adapt to movements of the parent shell or the
target part/widget
- It has to manually hide and show depending on visibility changes of
the target part/widget
- It does not follow events of the target immediately, i.e., movements
are always some milliseconds behind, minimize/maximize
operations/animations are not synchronous etc.
- It does not locate properly when the platform uses Wayland, as manual
shell positioning is not possible there

This change replaces the dialog-based implementation of the
FindReplaceOverlay with an in-place composite-based implementation. A
composite is created in the target widget and placed relative to this
composite. In consequence, the overlay automatically follows all move,
resize, hide/show operations of the target widget.

Fixes eclipse-platform/eclipse.platform.swt#1447

Fixes eclipse-platform#2099
HeikoKlare added a commit to HeikoKlare/eclipse.platform.ui that referenced this issue Oct 3, 2024
…-platform#2099

The FindReplaceOverlay is currently realized as a separate shell (more
precisely, a JFace Dialog), which is placed at a proper position on top
of the workbench shell. This has some drawback:
- It has to manually adapt to movements of the parent shell or the
target part/widget
- It has to manually hide and show depending on visibility changes of
the target part/widget
- It does not follow events of the target immediately, i.e., movements
are always some milliseconds behind, minimize/maximize
operations/animations are not synchronous etc.
- It does not locate properly when the platform uses Wayland, as manual
shell positioning is not possible there

This change replaces the dialog-based implementation of the
FindReplaceOverlay with an in-place composite-based implementation. A
composite is created in the target widget and placed relative to this
composite. In consequence, the overlay automatically follows all move,
resize, hide/show operations of the target widget.

Fixes eclipse-platform/eclipse.platform.swt#1447

Fixes eclipse-platform#2099

Fixes eclipse-platform#2246
HeikoKlare added a commit to HeikoKlare/eclipse.platform.ui that referenced this issue Oct 3, 2024
…-platform#2099

The FindReplaceOverlay is currently realized as a separate shell (more
precisely, a JFace Dialog), which is placed at a proper position on top
of the workbench shell. This has some drawback:
- It has to manually adapt to movements of the parent shell or the
target part/widget
- It has to manually hide and show depending on visibility changes of
the target part/widget
- It does not follow events of the target immediately, i.e., movements
are always some milliseconds behind, minimize/maximize
operations/animations are not synchronous etc.
- It does not locate properly when the platform uses Wayland, as manual
shell positioning is not possible there

This change replaces the dialog-based implementation of the
FindReplaceOverlay with an in-place composite-based implementation. A
composite is created in the target widget and placed relative to this
composite. In consequence, the overlay automatically follows all move,
resize, hide/show operations of the target widget.

Fixes eclipse-platform/eclipse.platform.swt#1447

Fixes eclipse-platform#2099

Fixes eclipse-platform#2246
HeikoKlare added a commit to HeikoKlare/eclipse.platform.ui that referenced this issue Oct 10, 2024
…-platform#2099

The FindReplaceOverlay is currently realized as a separate shell (more
precisely, a JFace Dialog), which is placed at a proper position on top
of the workbench shell. This has some drawback:
- It has to manually adapt to movements of the parent shell or the
target part/widget
- It has to manually hide and show depending on visibility changes of
the target part/widget
- It does not follow events of the target immediately, i.e., movements
are always some milliseconds behind, minimize/maximize
operations/animations are not synchronous etc.
- It does not locate properly when the platform uses Wayland, as manual
shell positioning is not possible there

This change replaces the dialog-based implementation of the
FindReplaceOverlay with an in-place composite-based implementation. A
composite is created in the target widget and placed relative to this
composite. In consequence, the overlay automatically follows all move,
resize, hide/show operations of the target widget.

Fixes eclipse-platform/eclipse.platform.swt#1447

Fixes eclipse-platform#2099

Fixes eclipse-platform#2246
HeikoKlare added a commit to HeikoKlare/eclipse.platform.ui that referenced this issue Oct 10, 2024
…-platform#2099

The FindReplaceOverlay is currently realized as a separate shell (more
precisely, a JFace Dialog), which is placed at a proper position on top
of the workbench shell. This has some drawback:
- It has to manually adapt to movements of the parent shell or the
target part/widget
- It has to manually hide and show depending on visibility changes of
the target part/widget
- It does not follow events of the target immediately, i.e., movements
are always some milliseconds behind, minimize/maximize
operations/animations are not synchronous etc.
- It does not locate properly when the platform uses Wayland, as manual
shell positioning is not possible there

This change replaces the dialog-based implementation of the
FindReplaceOverlay with an in-place composite-based implementation. A
composite is created in the target widget and placed relative to this
composite. In consequence, the overlay automatically follows all move,
resize, hide/show operations of the target widget.

Fixes eclipse-platform/eclipse.platform.swt#1447

Fixes eclipse-platform#2099

Fixes eclipse-platform#2246
HeikoKlare added a commit to HeikoKlare/eclipse.platform.ui that referenced this issue Oct 11, 2024
…-platform#2099

The FindReplaceOverlay is currently realized as a separate shell (more
precisely, a JFace Dialog), which is placed at a proper position on top
of the workbench shell. This has some drawback:
- It has to manually adapt to movements of the parent shell or the
target part/widget
- It has to manually hide and show depending on visibility changes of
the target part/widget
- It does not follow events of the target immediately, i.e., movements
are always some milliseconds behind, minimize/maximize
operations/animations are not synchronous etc.
- It does not locate properly when the platform uses Wayland, as manual
shell positioning is not possible there

This change replaces the dialog-based implementation of the
FindReplaceOverlay with an in-place composite-based implementation. A
composite is created in the target widget and placed relative to this
composite. In consequence, the overlay automatically follows all move,
resize, hide/show operations of the target widget.

Fixes eclipse-platform/eclipse.platform.swt#1447

Fixes eclipse-platform#2099

Fixes eclipse-platform#2246
HeikoKlare added a commit to eclipse-platform/eclipse.platform.ui that referenced this issue Oct 11, 2024
The FindReplaceOverlay is currently realized as a separate shell (more
precisely, a JFace Dialog), which is placed at a proper position on top
of the workbench shell. This has some drawback:
- It has to manually adapt to movements of the parent shell or the
target part/widget
- It has to manually hide and show depending on visibility changes of
the target part/widget
- It does not follow events of the target immediately, i.e., movements
are always some milliseconds behind, minimize/maximize
operations/animations are not synchronous etc.
- It does not locate properly when the platform uses Wayland, as manual
shell positioning is not possible there

This change replaces the dialog-based implementation of the
FindReplaceOverlay with an in-place composite-based implementation. A
composite is created in the target widget and placed relative to this
composite. In consequence, the overlay automatically follows all move,
resize, hide/show operations of the target widget.

Fixes eclipse-platform/eclipse.platform.swt#1447

Fixes #2099

Fixes #2246
praveen-skp pushed a commit to praveen-skp/eclipse.platform.ui that referenced this issue Oct 14, 2024
…-platform#2099

The FindReplaceOverlay is currently realized as a separate shell (more
precisely, a JFace Dialog), which is placed at a proper position on top
of the workbench shell. This has some drawback:
- It has to manually adapt to movements of the parent shell or the
target part/widget
- It has to manually hide and show depending on visibility changes of
the target part/widget
- It does not follow events of the target immediately, i.e., movements
are always some milliseconds behind, minimize/maximize
operations/animations are not synchronous etc.
- It does not locate properly when the platform uses Wayland, as manual
shell positioning is not possible there

This change replaces the dialog-based implementation of the
FindReplaceOverlay with an in-place composite-based implementation. A
composite is created in the target widget and placed relative to this
composite. In consequence, the overlay automatically follows all move,
resize, hide/show operations of the target widget.

Fixes eclipse-platform/eclipse.platform.swt#1447

Fixes eclipse-platform#2099

Fixes eclipse-platform#2246
lathapatil pushed a commit to lathapatil/eclipse.platform.ui that referenced this issue Oct 21, 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
lathapatil pushed a commit to lathapatil/eclipse.platform.ui that referenced this issue Oct 21, 2024
…-platform#2099

The FindReplaceOverlay is currently realized as a separate shell (more
precisely, a JFace Dialog), which is placed at a proper position on top
of the workbench shell. This has some drawback:
- It has to manually adapt to movements of the parent shell or the
target part/widget
- It has to manually hide and show depending on visibility changes of
the target part/widget
- It does not follow events of the target immediately, i.e., movements
are always some milliseconds behind, minimize/maximize
operations/animations are not synchronous etc.
- It does not locate properly when the platform uses Wayland, as manual
shell positioning is not possible there

This change replaces the dialog-based implementation of the
FindReplaceOverlay with an in-place composite-based implementation. A
composite is created in the target widget and placed relative to this
composite. In consequence, the overlay automatically follows all move,
resize, hide/show operations of the target widget.

Fixes eclipse-platform/eclipse.platform.swt#1447

Fixes eclipse-platform#2099

Fixes eclipse-platform#2246
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Linux/GTK Happens on Linux Wayland
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants