From c2a7146168dfe4d122beec7e20f36d7742d81e1f Mon Sep 17 00:00:00 2001 From: werapi Date: Wed, 7 Jan 2026 15:46:25 +0100 Subject: [PATCH 1/8] fix: pointer events being one event behind --- src/mango.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/mango.c b/src/mango.c index 89ee23e2..f4f75170 100644 --- a/src/mango.c +++ b/src/mango.c @@ -3966,19 +3966,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( @@ -4016,6 +4003,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)); From 43965a1155b33c2174a8a829e6426d0088ef2a7a Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Sun, 1 Mar 2026 11:21:24 +0800 Subject: [PATCH 2/8] update readme --- README.md | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 45da36cd..b3117018 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Mango Wayland Compositor
- MangoWC Logo + MangoWM Logo
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.vercel.app/docs) # 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). From e935af07c167933e312fcb8c2cfb970991bb4629 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Sun, 1 Mar 2026 11:35:51 +0800 Subject: [PATCH 3/8] project: rename guix file --- mangowc.scm => mangowm.scm | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename mangowc.scm => mangowm.scm (100%) diff --git a/mangowc.scm b/mangowm.scm similarity index 100% rename from mangowc.scm rename to mangowm.scm From 811610e481714df988b6602d7b20fedb4c68ac4c Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Sun, 1 Mar 2026 11:38:17 +0800 Subject: [PATCH 4/8] rename mangowc to mangowm --- mangowm.scm | 12 ++++++------ mmsg/mmsg.c | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/mangowm.scm b/mangowm.scm index 9c55d43e..33d95045 100644 --- a/mangowm.scm +++ b/mangowm.scm @@ -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 diff --git a/mmsg/mmsg.c b/mmsg/mmsg.c index fb1d04fd..4e0e1d8c 100644 --- a/mmsg/mmsg.c +++ b/mmsg/mmsg.c @@ -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 Select output (monitor)\n" "\n" "GET OPTIONS (used with -g or -w):\n" From 755ffe06af4d8e93f8863c404024bc96ad0c636a Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Sun, 1 Mar 2026 11:42:44 +0800 Subject: [PATCH 5/8] update website in readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b3117018..d5171acc 100644 --- a/README.md +++ b/README.md @@ -208,7 +208,7 @@ git clone https://github.com/DreamMaoMao/mango-config.git ~/.config/mango Refer to the repo wiki [wiki](https://github.com/mangowm/mango/wiki/) -or the website docs [docs](https://mangowm.vercel.app/docs) +or the website docs [docs](https://mangowm.github.io/mango-web/) # NixOS + Home-manager From 243848f43e96e0e6c79210e014219b25c6d35e86 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Sun, 1 Mar 2026 12:02:57 +0800 Subject: [PATCH 6/8] bump version to 0.12.5 --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 32b363be..85fe15b6 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ project('mango', ['c', 'cpp'], - version : '0.12.4', + version : '0.12.5', ) subdir('protocols') From 008cb9726e36c1062f059a0505e4d6671ea425db Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Sun, 1 Mar 2026 18:04:21 +0800 Subject: [PATCH 7/8] Revert "Add nix option to enable/disable adding to session manager" --- nix/nixos-modules.nix | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/nix/nixos-modules.nix b/nix/nixos-modules.nix index 7a9f930a..33811022 100644 --- a/nix/nixos-modules.nix +++ b/nix/nixos-modules.nix @@ -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; }; From 9922ed26c7fb1a3456077535c01acec0390bc962 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Sun, 1 Mar 2026 18:13:40 +0800 Subject: [PATCH 8/8] update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d5171acc..b927b920 100644 --- a/README.md +++ b/README.md @@ -208,7 +208,7 @@ git clone https://github.com/DreamMaoMao/mango-config.git ~/.config/mango Refer to the repo wiki [wiki](https://github.com/mangowm/mango/wiki/) -or the website docs [docs](https://mangowm.github.io/mango-web/) +or the website docs [docs](https://mangowm.github.io/) # NixOS + Home-manager