rust-windowing / rust-windowing/winit

Add option to block compositing on X11 (_NET_WM_BYPASS_COMPOSITOR)

Open
#2,707 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

DS - x11 S - enhancement
Dominant language
Rust
Stars
6.2k
Forks
1.3k
Avg merge
2d 19h
Merged PRs (30d)
9

Description

I'm using winit to create a full screen window and then use it as a Vulkan surface. The problem is that the KWin compositor inserts one more buffer in the swapchain, causing a one-frame delay and also disabling any kind of GSync or similar functionality.

AFAIK this is a specific KDE problem, because they decided to not support unredirecting full screen windows, and opted to use _NET_WM_BYPASS_COMPOSITOR (which in turn disables composition on the whole system while the window is active). This is what SDL and a bunch of other game frameworks do.

Right now I have a manual kwin rule for the application, but it makes distribution harder.

I'd love to create a PR to add a method to WindowExtX11, but I'm not sure what the preferred way to do this would be.

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 with the WindowExtX11 trait and the X11 behavior described in the issue, then read how winit exposes X11-specific window operations. Done means a clear X11-only option can request _NET_WM_BYPASS_COMPOSITOR for the window, with its intended fullscreen behavior documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
desktop, operating-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.