Skip to content

linux: fix GDK warning on pointer leave from an offscreen GTK web view - #86

Open
sduguay-devolutions wants to merge 1 commit into
AvaloniaUI:mainfrom
Devolutions:fix/leave-event-missing-gdk-device
Open

sduguay-devolutions wants to merge 1 commit into
AvaloniaUI:mainfrom
Devolutions:fix/leave-event-missing-gdk-device

Conversation

@sduguay-devolutions

Copy link
Copy Markdown

Issue

GDK logs this on every pointer leave out of an offscreen web view:
(Avalonia.Controls.WebView.Samples.Desktop:832198): Gdk-WARNING **: Event with type 11 not holding a GdkDevice. It is most likely synthesized outside Gdk/GTK+

Fix

PointerLeaveInput now takes the pointer from the default seat and attaches it with gdk_event_set_device, which is what the synthesized events in the same file already do for the same reason.

A crossing event has no device field to assign the way motion, button
and scroll do, so the synthesized leave went out without one and GDK
warned "Event with type 11 not holding a GdkDevice" on every pointer
leave out of an offscreen web view. Set it through gdk_event_set_device,
as the synthesized key events already do.

The Desktop sample logs the warning 33 times in a 25 second run, and
none after.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@sduguay-devolutions
sduguay-devolutions force-pushed the fix/leave-event-missing-gdk-device branch from ad49bc8 to 94d0328 Compare September 24, 2026 14:41

This branch has not been deployed

No deployments
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.

1 participant