From 2fde1dd96a14c7002d47172ff2a412f2bb402894 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Wed, 21 Feb 2024 22:58:43 +0700 Subject: [PATCH] overview: fix drag and drop for ws 11+ --- .config/ags/modules/overview/overview_hyprland.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.config/ags/modules/overview/overview_hyprland.js b/.config/ags/modules/overview/overview_hyprland.js index 6029e8d70..686889275 100644 --- a/.config/ags/modules/overview/overview_hyprland.js +++ b/.config/ags/modules/overview/overview_hyprland.js @@ -260,7 +260,8 @@ export default () => { setup: (eventbox) => { eventbox.drag_dest_set(Gtk.DestDefaults.ALL, TARGET, Gdk.DragAction.COPY); eventbox.connect('drag-data-received', (_w, _c, _x, _y, data) => { - Hyprland.messageAsync(`dispatch movetoworkspacesilent ${index},address:${data.get_text()}`) + const offset = Math.floor((Hyprland.active.workspace.id - 1) / NUM_OF_WORKSPACES_SHOWN) * NUM_OF_WORKSPACES_SHOWN; + Hyprland.messageAsync(`dispatch movetoworkspacesilent ${index + offset},address:${data.get_text()}`) overviewTick.setValue(!overviewTick.value); }); },