Record: dock identity, remembered size, and placement

Outcome

The handler now identifies itself to the desktop, honours its remembered size, and its remaining limitations around placement are documented with the available choices.

The Dock Showed a Generic Icon

A running window is matched to a desktop entry by its application id. The handler runs as python3 appimage_handler_ui.py, so the id the compositor saw was python3, which matches no desktop file, and the entry carried no StartupWMClass fallback for X11.

Fixes:

Verified on the real desktop after handler install: the entry now has both Icon=appimage-handler and StartupWMClass=appimage-handler. If the dock still shows a generic icon, the diagnostic is to open Looking Glass (lg) and read the window’s app-id, then report it.

The Window Did Not Preserve Its Size

The saved state was:

main:   1397 x 1866
    inspect: 1119 x 1080
    result:  1210 x 1080

The screen is 5120x2160, so the remembered main size fits and should have been restored. Instead it was being clamped to 1080, which is exactly the hardcoded fallback in work_area() (1920x1080). The monitor query was failing and the fallback was silently limiting every window.

Fixes:

Placement Choices

Wayland does not let a client choose or read its own toplevel position, and on this host org.gnome.mutter center-new-windows is false, so the handler opens wherever the compositor puts it.

Choice How Trade-off
Let the compositor place it nothing no control over position
Centre every new window gsettings set org.gnome.mutter center-new-windows true session-wide, not specific to the handler
Position it from the client install xdotool, run under XWayland with GDK_BACKEND=x11 position and centring work, at the cost of XWayland
Use a placement extension a GNOME Shell extension that places windows by app id another component to maintain
Anchor it as an overlay a layer-shell client GNOME does not implement wlr-layer-shell, so it is unavailable here

The handler already reads and writes position through xdotool on X11, so the XWayland choice needs no code change.

Reduced Conflict Notice

When an application is already installed, the main window now adds only:

This application is already installed.
    Integrate will show details, then offer to replace or add alongside.

The full details still appear in the text area when Integrate is pressed.

Verification

Verified 2026-09-22 with make test; all fifteen test scripts passed.

Commits