[Gtk4] Fix stale/unresponsive fast-view restore buttons and toolbar #3440
Merged
Conversation
raise On GTK4, widgets have no per-widget GdkWindow, so the native sibling list doubles as both paint order and Composite._getChildren() order. This caused several fast-view (minimize/restore) regressions vs GTK3: - Control.destroyWidget() only called swt_fixed_remove() when fixedHandle != 0, silently skipping the native unparent for widgets without a separate wrapper handle. Their Java objects were marked disposed while the native widget stayed alive and rendered, leaving stale toolbar/button remnants behind after a restore. - Composite.moveAbove()/moveBelow() raising a Shell-direct child to the front (e.g. a flyout pane) did not actually reorder GTK4 paint order, since the general child-list-preserving behavior needed by other callers took precedence. - ToolBar.getItemCount()/_getItems() did not account for a Menu's GtkPopover appearing as a native sibling alongside real ToolItems, causing a ClassCastException and item count/index mismatches when a context menu was attached to a fast-view toolbar.
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On GTK4, widgets have no per-widget GdkWindow, so the native sibling list doubles as both paint order and Composite._getChildren() order. This caused several fast-view (minimize/restore) regressions vs GTK3: