linebender / linebender/druid

The goal and scope of the GTK backend in druid-shell

Open
#860 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

architecture discussion shell/gtk
Dominant language
Rust
Stars
9.7k
Forks
565
PR merge metrics
No merged PRs in 30d

Description

What exactly is the goal of the GTK backend in druid-shell?

Is it a temporary solution or a more permanent one?
- If temporary, what is the real goal? Some sort of barebones X11 and Wayland support?
- If it's a permanent target, then what is the scope?
- Ubuntu
- All Linux flavors (distros/X11/Wayland)
- All GTK platforms (including Windows/macOS)

The problem with GTK is that it's not consistent. It has platform specific behavior. For example for mouse events the [ModifierType docs](https://valadoc.org/gdk-3.0/Gdk.ModifierType.html) state *the GDK X backend interprets button press events for button 4-7 as scroll events, so `gdk_button4_mask` and `gdk_button5_mask` will never be set*. There are also similar issues with keyboard events.

This means that it's not possible to just target one GTK. The GTK druid-shell layer has to basically have an internal gtk-shell abstraction which deals with delivering a consistent GTK API across the different platforms that GTK might run on.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the GTK backend in druid-shell and its handling of platform-specific mouse and keyboard behavior. Clarify whether the backend is temporary or permanent, which GTK platforms it should support, and whether a consistent internal abstraction is required; done means the scope and goal are documented and agreed.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
desktop
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.