forked from Shinonome/dots-hyprland
remove unnecessary workaround for already fixed hyprland focus bug
This commit is contained in:
@@ -18,7 +18,6 @@ import { substitute } from "../.miscutils/icons.js";
|
|||||||
|
|
||||||
const NUM_OF_WORKSPACES_SHOWN = userOptions.overview.numOfCols * userOptions.overview.numOfRows;
|
const NUM_OF_WORKSPACES_SHOWN = userOptions.overview.numOfCols * userOptions.overview.numOfRows;
|
||||||
const TARGET = [Gtk.TargetEntry.new('text/plain', Gtk.TargetFlags.SAME_APP, 0)];
|
const TARGET = [Gtk.TargetEntry.new('text/plain', Gtk.TargetFlags.SAME_APP, 0)];
|
||||||
const POPUP_CLOSE_TIME = 100; // ms
|
|
||||||
|
|
||||||
const overviewTick = Variable(false);
|
const overviewTick = Variable(false);
|
||||||
|
|
||||||
@@ -86,8 +85,8 @@ export default () => {
|
|||||||
margin-bottom: -${Math.round((y + h) * userOptions.overview.scale)}px;
|
margin-bottom: -${Math.round((y + h) * userOptions.overview.scale)}px;
|
||||||
`,
|
`,
|
||||||
onClicked: (self) => {
|
onClicked: (self) => {
|
||||||
|
Hyprland.messageAsync(`dispatch focuswindow address:${address}`);
|
||||||
App.closeWindow('overview');
|
App.closeWindow('overview');
|
||||||
Utils.timeout(POPUP_CLOSE_TIME, () => Hyprland.messageAsync(`dispatch focuswindow address:${address}`));
|
|
||||||
},
|
},
|
||||||
onMiddleClickRelease: () => Hyprland.messageAsync(`dispatch closewindow address:${address}`),
|
onMiddleClickRelease: () => Hyprland.messageAsync(`dispatch closewindow address:${address}`),
|
||||||
onSecondaryClick: (button) => {
|
onSecondaryClick: (button) => {
|
||||||
@@ -159,7 +158,6 @@ export default () => {
|
|||||||
|
|
||||||
button.drag_source_set(Gdk.ModifierType.BUTTON1_MASK, TARGET, Gdk.DragAction.MOVE);
|
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_name(substitute(c));
|
||||||
// button.drag_source_set_icon_gicon(icon);
|
|
||||||
|
|
||||||
button.connect('drag-begin', (button) => { // On drag start, add the dragging class
|
button.connect('drag-begin', (button) => { // On drag start, add the dragging class
|
||||||
button.toggleClassName('overview-tasks-window-dragging', true);
|
button.toggleClassName('overview-tasks-window-dragging', true);
|
||||||
@@ -235,8 +233,8 @@ export default () => {
|
|||||||
children: [Widget.EventBox({
|
children: [Widget.EventBox({
|
||||||
hexpand: true,
|
hexpand: true,
|
||||||
onPrimaryClick: () => {
|
onPrimaryClick: () => {
|
||||||
|
Hyprland.messageAsync(`dispatch workspace ${index}`);
|
||||||
App.closeWindow('overview');
|
App.closeWindow('overview');
|
||||||
Utils.timeout(POPUP_CLOSE_TIME, () => Hyprland.messageAsync(`dispatch workspace ${index}`));
|
|
||||||
},
|
},
|
||||||
setup: (eventbox) => {
|
setup: (eventbox) => {
|
||||||
eventbox.drag_dest_set(Gtk.DestDefaults.ALL, TARGET, Gdk.DragAction.COPY);
|
eventbox.drag_dest_set(Gtk.DestDefaults.ALL, TARGET, Gdk.DragAction.COPY);
|
||||||
|
|||||||
Reference in New Issue
Block a user