Merge branch 'mangowm:main' into main

This commit is contained in:
Ananya 2026-03-01 13:52:41 +01:00 committed by GitHub
commit 5396ec13c2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 46 additions and 50 deletions

View file

@ -1,6 +1,6 @@
# Mango Wayland Compositor
<div>
<img src="https://github.com/DreamMaoMao/mangowc/blob/main/assets/mango-transparency-256.png" alt="MangoWC Logo" width="120"/>
<img src="https://github.com/mangowm/mango/blob/main/assets/mango-transparency-256.png" alt="MangoWM Logo" width="120"/>
</div>
This project's development is based on [dwl](https://codeberg.org/dwl/dwl/).
@ -36,7 +36,7 @@ https://github.com/user-attachments/assets/bb83004a-0563-4b48-ad89-6461a9b78b1f
**Mango won't cater to every user preference**: For niche feature requests, I'll take a wait-and-see approach. I'll only consider adding them if they get a significant number of upvotes.
# Our discord
[mangowc](https://discord.gg/CPjbDxesh5)
[mangowm](https://discord.gg/CPjbDxesh5)
# Supported layouts
- tile
@ -52,7 +52,7 @@ https://github.com/user-attachments/assets/bb83004a-0563-4b48-ad89-6461a9b78b1f
# Installation
[![Packaging status](https://repology.org/badge/vertical-allrepos/mangowc.svg)](https://repology.org/project/mangowc/versions)
[![Packaging status](https://repology.org/badge/vertical-allrepos/mangowm.svg)](https://repology.org/project/mangowm/versions)
## Dependencies
@ -71,9 +71,9 @@ https://github.com/user-attachments/assets/bb83004a-0563-4b48-ad89-6461a9b78b1f
- libxcb
## Arch Linux
The package is in the Arch User Repository and is available for manual download [here](https://aur.archlinux.org/packages/mangowc-git) or through a AUR helper like yay:
The package is in the Arch User Repository and is available for manual download [here](https://aur.archlinux.org/packages/mangowm-git) or through a AUR helper like yay:
```bash
yay -S mangowc-git
yay -S mangowm-git
```
@ -87,12 +87,12 @@ eselect repository enable guru
emerge --sync guru
```
Then, add `gui-libs/scenefx` and `gui-wm/mangowc` to the `package.accept_keywords`.
Then, add `gui-libs/scenefx` and `gui-wm/mangowm` to the `package.accept_keywords`.
Finally, install the package:
```bash
emerge --ask --verbose gui-wm/mangowc
emerge --ask --verbose gui-wm/mangowm
```
## Fedora Linux
@ -102,32 +102,32 @@ First, add the [Terra Repository](https://terra.fyralabs.com/).
Then, install the package:
```bash
dnf install mangowc
dnf install mangowm
```
## Guix System
The package definition is described in the source repository.
First, add `mangowc` channel to `channels.scm` file:
First, add `mangowm` channel to `channels.scm` file:
```scheme
;; In $HOME/.config/guix/channels.scm
(cons (channel
(name 'mangowc)
(url "https://github.com/DreamMaoMao/mangowc.git")
(name 'mangowm)
(url "https://github.com/mangowm/mango.git")
(branch "main"))
... ;; Your other channels
%default-channels)
```
Then, run `guix pull` and after update you can either run
`guix install mangowc` or add it to your configuration via:
`guix install mangowm` or add it to your configuration via:
```scheme
(use-modules (mangowc)) ;; Add mangowc module
(use-modules (mangowm)) ;; Add mangowm module
;; Add mangowc to packages list
;; Add mangowm to packages list
(packages (cons*
mangowc-git
mangowm-git
... ;; Other packages you specified
%base-packages))
```
@ -147,8 +147,8 @@ cd scenefx
meson build -Dprefix=/usr
sudo ninja -C build install
git clone https://github.com/DreamMaoMao/mangowc.git
cd mangowc
git clone https://github.com/mangowm/mango.git
cd mangowm
meson build -Dprefix=/usr
sudo ninja -C build install
```
@ -206,9 +206,9 @@ git clone https://github.com/DreamMaoMao/mango-config.git ~/.config/mango
## Config Documentation
Refer to the repo wiki [wiki](https://github.com/DreamMaoMao/mango/wiki/)
Refer to the repo wiki [wiki](https://github.com/mangowm/mango/wiki/)
or the website docs [docs](https://mangowc.vercel.app/docs)
or the website docs [docs](https://mangowm.github.io/)
# NixOS + Home-manager
@ -228,7 +228,7 @@ Here's an example of using the modules in a flake:
};
flake-parts.url = "github:hercules-ci/flake-parts";
mango = {
url = "github:DreamMaoMao/mango";
url = "github:mangowm/mango";
inputs.nixpkgs.follows = "nixpkgs";
};
};
@ -290,9 +290,9 @@ Here's an example of using the modules in a flake:
To package mango for other distributions, you can check the reference setup for:
- [nix](https://github.com/DreamMaoMao/mangowc/blob/main/nix/default.nix)
- [arch](https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=mangowc-git).
- [gentoo](https://data.gpo.zugaina.org/guru/gui-wm/mangowc)
- [nix](https://github.com/mangowm/mango/blob/main/nix/default.nix)
- [arch](https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=mangowm-git).
- [gentoo](https://data.gpo.zugaina.org/guru/gui-wm/mangowm)
You might need to package `scenefx` for your distribution, check availability [here](https://github.com/wlrfx/scenefx.git).

View file

@ -1,4 +1,4 @@
(define-module (mangowc)
(define-module (mangowm)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix gexp)
@ -18,11 +18,11 @@
#:use-module (guix licenses))
(define-public mangowc-git
(define-public mangowm-git
(package
(name "mangowc")
(name "mangowm")
(version "git")
(source (local-file "." "mangowc-checkout"
(source (local-file "." "mangowm-checkout"
#:recursive? #t
#:select? (or (git-predicate (current-source-directory))
(const #t))))
@ -55,10 +55,10 @@
wlroots
scenefx))
(native-inputs (list pkg-config wayland-protocols))
(home-page "https://github.com/DreamMaoMao/mangowc")
(home-page "https://github.com/DreamMaoMao/mangowm")
(synopsis "Wayland compositor based on wlroots and scenefx")
(description "A Wayland compositor based on wlroots and scenefx,
inspired by dwl but aiming to be more feature-rich.")
(license gpl3)))
mangowc-git
mangowm-git

View file

@ -1,5 +1,5 @@
project('mango', ['c', 'cpp'],
version : '0.12.4',
version : '0.12.5',
)
subdir('protocols')

View file

@ -500,7 +500,7 @@ static const struct wl_registry_listener registry_listener = {
static void usage(void) {
fprintf(stderr,
"mmsg - MangoWC IPC\n"
"mmsg - MangoWM IPC\n"
"\n"
"SYNOPSIS:\n"
"\tmmsg [-OTLq]\n"
@ -517,7 +517,7 @@ static void usage(void) {
"\t-O Get all output (monitor) information\n"
"\t-T Get number of tags\n"
"\t-L Get all available layouts\n"
"\t-q Quit MangoWC\n"
"\t-q Quit mango\n"
"\t-o <output> Select output (monitor)\n"
"\n"
"GET OPTIONS (used with -g or -w):\n"

View file

@ -9,10 +9,6 @@ in {
options = {
programs.mango = {
enable = lib.mkEnableOption "mango, a wayland compositor based on dwl";
addLoginEntry = lib.mkEnableOption {
default = true;
description = "Whether to add a login entry to the display manager for mango";
};
package = lib.mkOption {
type = lib.types.package;
default = self.packages.${pkgs.stdenv.hostPlatform.system}.mango;
@ -59,7 +55,7 @@ in {
programs.xwayland.enable = lib.mkDefault true;
services = {
displayManager.sessionPackages = lib.mkIf cfg.addLoginEntry [ cfg.package ];
displayManager.sessionPackages = [cfg.package];
graphical-desktop.enable = lib.mkDefault true;
};

View file

@ -4266,19 +4266,6 @@ void motionnotify(uint32_t time, struct wlr_input_device *device, double dx,
struct wlr_pointer_constraint_v1 *constraint;
bool should_lock = false;
/* Find the client under the pointer and send the event along. */
xytonode(cursor->x, cursor->y, &surface, &c, NULL, &sx, &sy);
if (cursor_mode == CurPressed && !seat->drag &&
surface != seat->pointer_state.focused_surface &&
toplevel_from_wlr_surface(seat->pointer_state.focused_surface, &w,
&l) >= 0) {
c = w;
surface = seat->pointer_state.focused_surface;
sx = cursor->x - (l ? l->scene->node.x : w->geom.x);
sy = cursor->y - (l ? l->scene->node.y : w->geom.y);
}
/* time is 0 in internal calls meant to restore pointer focus. */
if (time) {
wlr_relative_pointer_manager_v1_send_relative_motion(
@ -4316,6 +4303,19 @@ void motionnotify(uint32_t time, struct wlr_input_device *device, double dx,
selmon = xytomon(cursor->x, cursor->y);
}
/* Find the client under the pointer and send the event along. */
xytonode(cursor->x, cursor->y, &surface, &c, NULL, &sx, &sy);
if (cursor_mode == CurPressed && !seat->drag &&
surface != seat->pointer_state.focused_surface &&
toplevel_from_wlr_surface(seat->pointer_state.focused_surface, &w,
&l) >= 0) {
c = w;
surface = seat->pointer_state.focused_surface;
sx = cursor->x - (l ? l->scene->node.x : w->geom.x);
sy = cursor->y - (l ? l->scene->node.y : w->geom.y);
}
/* Update drag icon's position */
wlr_scene_node_set_position(&drag_icon->node, (int32_t)round(cursor->x),
(int32_t)round(cursor->y));