remove unnecessary workaround for already fixed hyprland focus bug

This commit is contained in:
end-4
2024-04-14 22:25:44 +07:00
parent 78e62aa73e
commit 8e890cadb4
@@ -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);