overview: fix drag and drop for ws 11+

This commit is contained in:
end-4
2024-02-21 22:58:43 +07:00
parent 176fd8d4a1
commit 2fde1dd96a
@@ -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);
});
},