Skip to content

Adiciona o suporte para GNOME com Wayland - #500

Merged
KnifeLemon merged 11 commits into
KnifeLemon:mainfrom
yanscholze:g-waylnd
Oct 23, 2026
Merged

KnifeLemon merged 11 commits into
KnifeLemon:mainfrom
yanscholze:g-waylnd

Conversation

@yanscholze

Copy link
Copy Markdown
Contributor

Adds experimental GNOME Wayland support for modifier + file dragging. A GNOME Shell extension supplies pointer state through a private Unix socket, allowing Filee to detect gestures without /dev/input access or membership in the input group.

The extension positions the conversion wheel once per opening, allowing users to move onto a format. The integration reuses the existing gesture detector and respects configured modifiers, drag thresholds, Pause, scope and excluded applications. Existing X11 and KDE gesture paths remain separate.

Includes Linux packaging, extension installation/removal, connection status messages and setup instructions.

Implementation details, limitations and validation results are documented in docs/GNOME-WAYLAND.md.

Validation:

110 targeted application tests passed.

Core, CLI and platform test suites passed, with platform-specific skips.

Real Gio socket tests passed.

An isolated GNOME Shell 50 session successfully handled a native GTK4 Wayland file drag into Filee’s XWayland wheel and produced a PDF while preserving the source file.

X11 startup continued to load the existing input hook.

Limitations:

Manual testing in Nautilus, fractional scaling and multiple monitors remains pending.

Global selection shortcuts, hold gestures and Tab/wheel flipping during dragging are not provided by this integration.

The full suite was not entirely green: Setup and Engines failures are documented, and the lengthy application rendering batch was interrupted after approximately 15 minutes.

@KnifeLemon KnifeLemon added the feature New features label Oct 23, 2026

@KnifeLemon KnifeLemon left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Obrigado pela contribuição, @yanscholze! Escrevo a revisão em inglês para os outros mantenedores, mas pode responder em português.

Thanks for this, it's a careful piece of work. Using the Shell for pointer state avoids both the input group and /dev/input, and the socket checks (0600, peer UID), the bounded writes and the "don't pick up a drag that's already held" rule all look sensible. I merged it with current main on Windows and ran dotnet format --verify-no-changes and the build (both clean). The App tests for the GNOME bridge, triggers, gesture detector and localization passed (114), as did Platform (54) and Core (510). node --check passes on the extension, and sh -n passes on both scripts. I can't run a GNOME session here, so the real-session part rests on your testing. Thanks for writing down exactly what you did and didn't test.

A few things before it can go in:

1. docs/GNOME-WAYLAND.md. Docs in this repo are in English, and this file reads as a work log. It mentions an earlier version that isn't in the repo, local artifacts/ folders and the results of one test run. The validation record fits better in the PR description. Could the doc become a short English page with setup, what works, limits and troubleshooting? It also goes into the Linux package, so users will read it.

2. Overlap with #367 (native Wayland and Hyprland, being finished now). Both change LinuxPlatformServices.cs, installer/linux/INSTALL.txt and CONTRIBUTING.md, and git reports conflicts in all three. install.sh also conflicts with #360. #367 will probably go in first. After that, please check that _isDonut also matches the donut when Filee runs as a native Wayland client (FILEE_USE_WAYLAND=1), where the window has an app id instead of an X11 WM class.

3. Updates. When Filee is updated, either in the app or with the upgrade mode #360 adds, nothing touches ~/.local/share/gnome-shell/extensions/filee-donut@filee.sh, so the old extension stays. Also, install.sh refuses to run when that folder already exists, even if it carries our own .filee-package marker. Could install replace a folder that has our marker? And could the app say when the extension's protocol version doesn't match?

4. Smaller:

  • Error = "GNOME pointer integration requires XDG_RUNTIME_DIR." reaches the Triggers page in English. A key, or the log only, would be better.
  • The 16 ms timer runs for the whole session even when Filee isn't connected. It does almost nothing then, but it could start on incoming and stop when the connection closes.
  • README: only the English and Portuguese READMEs changed, and there are 14. The experimental KDE path isn't in the READMEs either, so it may be simplest to leave the READMEs out and keep the details in INSTALL.txt and the doc.

Translations: the two new strings are English in 12 of the 14 language files. That's fine, we'll translate them ourselves.

CI hasn't run on this PR yet (first-time contributor), and we'll start it. Thanks again!

To get this into the next release, we'll push the remaining changes to your branch ourselves today (maintainer edits are on). Have a look at the commits when they land, and tell us if anything looks off.

yanscholze and others added 10 commits October 23, 2026 13:24
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
install.sh: the GNOME extension step moves into KnifeLemon#360's first-install branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… connected

With FILEE_USE_WAYLAND=1 the donut is a native Wayland window, and
Avalonia.Wayland sets no app id, so there's no WM class to match. The
extension now also matches the title on the connected Filee process
(peer PID of the socket) or a process named filee.

The 16 ms pointer timer starts when Filee connects and stops when the
connection closes. Placing the donut uses its own short timer that ends
once the window is placed.

The socket is now pointer.sock and every line carries PROTOCOL_VERSION,
so Filee can tell an extension of another version from a missing one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…atch

The bridge reads the protocol version of each line: another version is
reported as VersionMismatch (and logged) instead of a silent reconnect
loop, and the Triggers page shows triggers.gnome_version_mismatch.

A missing XDG_RUNTIME_DIR is logged only; the page shows gestures as
stopped instead of an English error.

Translate the GNOME strings into every app language.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
install.sh replaces an extension folder that carries our .filee-package
marker and still refuses one without it on a first install. The upgrade
mode (also used by the in-app updater) refreshes our extension, adds it
on GNOME if it's missing without enabling it, and leaves a foreign
folder alone. The new copy is staged first, so a failed copy keeps the
previous one.

INSTALL.txt and docs/GNOME-WAYLAND.md describe updates, the version
notice and the native Wayland case.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Only two of the fourteen READMEs had it; INSTALL.txt and
docs/GNOME-WAYLAND.md carry the details.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The experimental Wayland notice still said KDE Plasma only. After KnifeLemon#367 it
names both and says how the donut gets to the cursor on each: a KWin
script on KDE Plasma, a window rule in hyprland.conf on Hyprland.

The GNOME notice now follows UsesGnomePointerBridge, so with
FILEE_WAYLAND_GESTURES=0 on GNOME the plain Wayland notice shows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@KnifeLemon

Copy link
Copy Markdown
Owner

@yanscholze I pushed the remaining changes to your branch, as promised. #367 and #360 are on main now, so the branch is merged with main and only the GNOME files differ. Have a look, and tell us if anything looks off.

  1. Doc: your new docs/GNOME-WAYLAND.md was already the short user page we hoped for. I only added an "Updates" section, the log location, and what happens under native Wayland (FILEE_USE_WAYLAND=1).
  2. feat(linux): add native Wayland support and generalize compositor gestures #367 overlap: the conflicts in LinuxPlatformServices.cs, INSTALL.txt, CONTRIBUTING.md and install.sh are resolved. Avalonia's Wayland backend doesn't set an app id, so under native Wayland the donut window has neither a WM class nor an app id. The extension now finds the donut by its title plus one of: WM class / app id, the PID of the Filee connected to the socket, or the process name.
  3. Updates: install.sh replaces an extension folder that carries our .filee-package marker and still refuses one without it. --upgrade (which the in-app updater runs) refreshes our extension, staging the new copy first so a failure leaves the old one in place. If the extension isn't there yet on GNOME, it's installed but not enabled. The protocol version is checked on every line, and a mismatch shows on the Triggers page. To make that possible, I took the version out of the socket name (pointer-v1.sock → pointer.sock) and put it in a PROTOCOL_VERSION constant: a version change now shows as "versions differ" instead of "extension not running".
  4. Smaller: the XDG_RUNTIME_DIR error goes to the log only. The 16 ms timer starts on a connection and stops when it closes, and placing the donut has its own short timer. The README changes are left out.

Translations for the GNOME strings are in all 14 languages (your Portuguese is kept). I also updated the general Wayland notice, which still said "KDE Plasma only" after #367 added Hyprland. The GNOME notice also no longer shows when FILEE_WAYLAND_GESTURES=0.

Build, dotnet format, the App tests for GNOME, triggers, gestures and localization (122), Platform tests, node --check and sh -n pass here. I can't run a GNOME session, so if you can try the branch on yours once more (an upgrade over an installed copy too), that would be great. Obrigado!

@yanscholze

Copy link
Copy Markdown
Contributor Author

Tested the latest changes on Fedora GNOME Wayland.

Everything is working correctly on my side:

  • dotnet build succeeds.
  • Tested the new in-place upgrade over my existing Filee installation — it completed successfully and preserved the installation correctly.
  • The GNOME extension was updated to v2, remained enabled, and loaded successfully after signing out/in.
  • Ctrl + drag from Nautilus correctly opens the donut at the cursor and conversion works as expected.
  • Also tested with FILEE_USE_WAYLAND=1; Ctrl + drag, donut positioning, and conversion all worked correctly with native Wayland as well.

I didn't notice any regressions or unexpected behavior during testing.

Looks good on Fedora GNOME Wayland from my side. Thanks for the changes!

@KnifeLemon
KnifeLemon merged commit d4d58eb into KnifeLemon:main Oct 23, 2026
18 of 20 checks passed
cre8ive-marketing pushed a commit to cre8ive-marketing/Filee that referenced this pull request Oct 24, 2026
On macos-15-intel the App tests alone take about 40 minutes (40 m 23 s on main's
run for KnifeLemon#496), so a slow runner went past the 60-minute limit and was cancelled
(KnifeLemon#497 twice, KnifeLemon#500 once).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants