Urgent.News

What's breaking now, across thousands of outlets.

Tech

Casilda 1.6 Released

Exciting news for Wayland compositor enthusiasts! Casilda 1.6 has been released, introducing drag-and-drop and clipboard support integration with the host compositor. This feature enables seamless dragging from host applications to Casilda embedded windows and vice versa.

The new version was developed following a challenging GUADEC presentation where the author showcased embedding a Cambalache instance within a Casilda compositor to display a slider window. After addressing all the bugs and refining the keyboard support, they focused on adding clipboard integration.

To achieve clipboard integration, a new GdkContentProvider was created, utilizing a wlr_data_source as its data source. This provider sets the content on GdkClipboard when the wlr_seat::request_set_selection event is received. Additionally, a new wlr_data_source was implemented to use a GdkClipboard as its source, setting selection using wlr_seat_set_selection(). Data is read from the client using gdk_clipboard_read_async() when the wlr_data_source's send() method is invoked.

Drag-and-drop integration proved to be more complex than clipboard integration. Drawing the drag icon surface at pointer coordinates initially resulted in blurry visuals due to fractional pointer coordinates. To resolve this, the drag surface was drawn after initiating the drag, but the blur persisted when attempting to integrate the drag with Gtk (host compositor).

Developers discovered that Gnome Shell (mutter) might be causing the blurriness. After gathering feedback and reviewing their merge request, Casilda now aligns with the improved behavior in Gnome Shell 51, ensuring sharper drag icons.

The release notes mention several use cases necessary to enable transparent drag-and-drop across host and guest compositors. Casilda delegates drag icon rendering to the host compositor while allowing for simultaneous drags in both the guest and host compositors. When a drag is initiated in the host compositor, Casilda reuses the GtkDropTargetAsync created to track motion events and connects to the drag-enter signal to generate a proxy drag source in wlroots.

Additionally, a button release event is synthesized on GtkDropTargetAsync::drop to trigger the drop on the guest side.

The author encourages users to file bugs if any issues arise during this integration, preferably providing a screencast for better understanding. They invite questions and further discussion in the #cambalache:gnome.org chat room. Connect with the author on Mastodon @xjuan for the latest updates on Casilda and Cambalache development.

Written by urgent.news from Lobsters's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at blogs.gnome.org →

More in Tech

More from Thursday 24 September →