Coder Social home page Coder Social logo

emersion / wleird Goto Github PK

View Code? Open in Web Editor NEW
40.0 3.0 13.0 78 KB

A collection a Wayland clients doing weird things, for compositor testing

Home Page: https://gitlab.freedesktop.org/emersion/wleird

License: MIT License

C 96.20% Meson 3.80%
wayland testing

wleird's Introduction

wleird

A collection of Wayland clients doing weird things, for compositor testing.

⚠️ Migrated to gitlab.freedesktop.org

This project has migrated to gitlab.freedesktop.org.

Some of these clients are intentionally misusing protocols in ways that help reveal compositor behavior, and should not be seen as reference implementations for good Wayland clients.

meson build
ninja -C build
  • attach-delta-loop: uses buffer position to move itself around in a circle
  • copy-fu: implements a number of copy-paste behaviors
  • cursor: uses buffer position to update a cursor's hotspot
  • damage-paint: uses fine-grained damage requests to draw shapes
  • disobey-resize: submits buffers in a different size than configured
  • frame-callback: requests frame callbacks indefinitely
  • gamma-blend: makes the compositor perform alpha-blending with a subsurface
  • resize-loop: resizes itself indefinitely
  • resizor: uses buffer position to initiate a client-side resize
  • resource-thief: makes the compositor run out of (fd or memory) resources
  • sigbus: trigger SIGBUS in the compositor by shrinking a shm file
  • slow-ack-configure: responds to configure events very slowly
  • subsurfaces: displays a bunch of subsurfaces and lets you reorder them
  • surface-outputs: prints on which outputs a surface is on
  • unmap: unmaps a buffer after displaying it

License

MIT

wleird's People

Contributors

ammgws avatar emersion avatar ifreund avatar kennylevinsen avatar mstoeckl avatar rmader avatar zzag avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

wleird's Issues

Test weirder ack_configure flows

  • Slow (take a second?)
  • Commit a few new buffers before
  • Send multiple ack_configure before commit
  • Ack the second to latest configure (if somehow possible)

Prefix binary names (similar to weston test clients)

This repo looks like a lovely collection of handy tools ❤️
I just find the names hard to discover (if installed to /usr/local/bin / launched via PATH as I usually do for test clients, so I can do it in a guest session).

I'd love to see the binary names prefix by something like wleird-, just as the Weston test clients have the weston- prefix - that makes the full list easy to discover. Mind doing so or would you accept a MR for that?

Cursor with subsurfaces

Add a cursor example with subsurfaces. Add in viewporter if you want to be hated by all compositor designers.

Not like anybody's ever going to support this.

Intended resizor behavior

In Weston, the surface is anchored to its bottom-right corner during resizing. In Sway/KWin, it's anchored to its top-left corner. Considering that there is code to change the surface buffer position, Weston's approach seems right, though an idea of Wayland clients being able to change their position feels weird to me.

Which behavior is the correct/intended one? Or is it up to compositors to decide?

Add wp_transactions_v1 demo

Add a client to demonstrate wp_transactions_v1 functionality. The client creates two surfaces and a transaction tying both of them. On first click, update and commit the first surface. On second click, do the same for the second one. Nothing should change on screen until the second click.

Drag operations

  • Start a drag with a NULL data source
  • Start a drag with a NULL icon

Memleak(?) in resize_buffer()

To reproduce:

  1. Open htop
  2. Run any client (tested with slow-ack-configure and frame-callback)
  3. Resize the client a lot
  4. Notice the memory usage increasing and staying there

Always recreating the buffer instead of resizing it fixes this. Valgrind doesn't seem to report anything useful.

sends-move-twice client

In GTK4 (3.98.2 and many versions before that), dragging the titlebar (e.g. in gtk4-demo) causes the xdg_toplevel move request to be sent twice in a row. This uncovered a problem in Wayfire: two instances of the move grab were activated, but this wasn't handled properly (only one instance was deactivated when letting go) so the whole compositor got stuck in a state where moving windows around was the only compositor function working.

Since this bug went unnoticed for ages in Wayfire, it's clear that most clients aren't doing that, and other compositor developers might make similar mistakes. Would be nice to have a test client that sends various state-changing requests like move and resize multiple times in a row.

SIGBUS client

  • Client generates SIGBUS by claiming buffer is larger than it is or truncating

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.