Skip to content

Fix dead/ghost panel references when pinning/unpinning under X11 - #73

Open
Col-E wants to merge 1 commit into
Benoker:masterfrom
Col-E:master
Open

Col-E wants to merge 1 commit into
Benoker:masterfrom
Col-E:master

Conversation

@Col-E

@Col-E Col-E commented Sep 15, 2026

Copy link
Copy Markdown

On Ubuntu 26 (and a few prior versions tested) rapidly pinning and unpinning a dockable panel leaves behind a dead/ghost panel.

Rough reproduction steps:

  1. Create a dockable panel associated with some side flap space
  2. Display it and toggle pin/unpin status rapidly, with final state being pinned
  3. Observe the intended panel does exist in the UI, but a "ghost" panel on top also exists
Example of issue

In practice the ghost appears to be an earlier painted snapshot of the intended panel we want to display. But its not intractable in any way directly. You can work around it by closing the live panel and displaying it again, which is odd, but the underlying issue seems to be X11 async event handling race conditions. On Windows Java/AWT interacts with the window system events are handled via a synchronous pipeline. But on Linux distros with X11, Java/AWT can't talk to the manager so it passes an async request through XWayland.


The main fixes are:

  • In DefaultFlapWindow: An explicit call to destroy (which in turn disposes the window) when the window is setVisible(false).
  • In ScreenDockFrame: Added call to Toolkit#sync() which eventually calls Xlib#XSynx.

Minor fixes:

  • Noticed slight flickering even with fix applied, adding window.setVisible( false ); mitigated on my instance of Ubuntu 26.
  • setFlapWindow has a block which reads to me as removing the existing component, but it references the parameter window which would be the new content, and not the field this.window holding existing content.

@Benoker Benoker self-assigned this Sep 16, 2026
@Benoker

Benoker commented Sep 16, 2026

Copy link
Copy Markdown
Owner

Thanks, will have a closer look and merge (within the next 1-2 weeks).

I avoided "destroy", because on older hardware creating a new window did introduce some lag. But that was many years ago, your modification makes sense today.

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.

2 participants