processing / processing/processing4

P2D and P3D renderers don't set `WM_CLASS` for Linux

Open
#777 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted linux
Dominant language
Java
Stars
494
Forks
183
Avg merge
4h 39m
Merged PRs (30d)
3

Description

Created by: @ColdMacaroni

Description

When running a sketch that uses the P2D or P3D renderer. The WM_CLASS window variable is not set. This makes it difficult (impossible?) to set window rules for the resulting window. (For example, making it so a tiling window manager makes the window float by default, instead of resizing it.)

Expected Behavior

WM_CLASS should be set to "Processing", "processing-sketch" or similar. For reference, the main processing app has a WM_CLASS of "Processing", "Processing" and a sketch with the default renderer has a WM_CLASS of "processing-core-PApplet", "processing-core-PApplet".

Current Behavior

The WM_CLASS variable is not set. (I don't mean empty, it just doesn't exist)

Steps to Reproduce

  1. Run a sketch that uses P2D or P3D as a renderer. Example code:
size(128, 128, P2D);
  1. Inspect the window class with xprop (or another similar tool). To use xprop, simply run it on a terminal and click on the window. You can also pipe it into grep to filter out the other variables: xprop | grep WM_CLASS

Your Environment

  • Processing version: 4.3 (1293)
  • Operating System and OS version: Arch Linux (kernel 6.4.12-arch1-1)
  • Other information:
    • Xorg server version: 21.1.8
    • Tested with the following window managers:
      • AwesomeWM
      • XMonad
      • Hyprland (through XWayland)

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 running the provided P2D or P3D sketch on Linux and inspect its window with xprop | grep WM_CLASS. Trace the P2D/P3D renderer's window initialization, then verify that the resulting window exposes a WM_CLASS such as "Processing", "processing-sketch" without changing the default renderer behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
desktop, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.