From 8e890cadb4a51ce784fdac85c50a3ee14354677a Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sun, 14 Apr 2024 22:25:44 +0700 Subject: [PATCH] remove unnecessary workaround for already fixed hyprland focus bug --- .config/ags/modules/overview/overview_hyprland.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.config/ags/modules/overview/overview_hyprland.js b/.config/ags/modules/overview/overview_hyprland.js index 8e724fe32..1419ee172 100644 --- a/.config/ags/modules/overview/overview_hyprland.js +++ b/.config/ags/modules/overview/overview_hyprland.js @@ -18,7 +18,6 @@ import { substitute } from "../.miscutils/icons.js"; const NUM_OF_WORKSPACES_SHOWN = userOptions.overview.numOfCols * userOptions.overview.numOfRows; const TARGET = [Gtk.TargetEntry.new('text/plain', Gtk.TargetFlags.SAME_APP, 0)]; -const POPUP_CLOSE_TIME = 100; // ms const overviewTick = Variable(false); @@ -86,8 +85,8 @@ export default () => { margin-bottom: -${Math.round((y + h) * userOptions.overview.scale)}px; `, onClicked: (self) => { + Hyprland.messageAsync(`dispatch focuswindow address:${address}`); App.closeWindow('overview'); - Utils.timeout(POPUP_CLOSE_TIME, () => Hyprland.messageAsync(`dispatch focuswindow address:${address}`)); }, onMiddleClickRelease: () => Hyprland.messageAsync(`dispatch closewindow address:${address}`), onSecondaryClick: (button) => { @@ -159,7 +158,6 @@ export default () => { button.drag_source_set(Gdk.ModifierType.BUTTON1_MASK, TARGET, Gdk.DragAction.MOVE); button.drag_source_set_icon_name(substitute(c)); - // button.drag_source_set_icon_gicon(icon); button.connect('drag-begin', (button) => { // On drag start, add the dragging class button.toggleClassName('overview-tasks-window-dragging', true); @@ -235,8 +233,8 @@ export default () => { children: [Widget.EventBox({ hexpand: true, onPrimaryClick: () => { + Hyprland.messageAsync(`dispatch workspace ${index}`); App.closeWindow('overview'); - Utils.timeout(POPUP_CLOSE_TIME, () => Hyprland.messageAsync(`dispatch workspace ${index}`)); }, setup: (eventbox) => { eventbox.drag_dest_set(Gtk.DestDefaults.ALL, TARGET, Gdk.DragAction.COPY);