Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class PinnedFavs {
const currentWorkspace = this.params.state.trigger('getCurrentWorkspace');
const newFavorites = [];
let refActorFound = false;
currentWorkspace.actor.get_children().forEach( (actor, i) => {
currentWorkspace.container.get_children().forEach( (actor, i) => {
const appGroup = currentWorkspace.appGroups.find( appGroup => appGroup.actor === actor );
if (!appGroup) return;
const {app, appId, isFavoriteApp} = appGroup.groupState;
Expand Down Expand Up @@ -799,12 +799,25 @@ class GroupedWindowListApplet extends Applet.Applet {
if(this.state.dragging.posList === null){
this.state.dragging.isForeign = !(source instanceof AppGroup);
this.state.dragging.posList = [];
currentWorkspace.actor.get_children().forEach( child => {

let offset = 0;
if (this.state.isHorizontal) {
offset = currentWorkspace.container.translation_x;
if (currentWorkspace.startButton.visible)
offset += currentWorkspace.startButton.width;
} else {
offset = currentWorkspace.container.translation_y;
if (currentWorkspace.startButton.visible)
offset += currentWorkspace.startButton.height;
}

currentWorkspace.container.get_children().forEach( child => {
let childPos;
let box = child.get_allocation_box();
if(rtl_horizontal)
childPos = this.actor.width - child.get_allocation_box()['x1'];
childPos = this.actor.width - (box.x1 + offset);
else
childPos = child.get_allocation_box()[axis[1]];
childPos = box[axis[1]] + offset;
this.state.dragging.posList.push(childPos);
});
}
Expand Down Expand Up @@ -833,21 +846,21 @@ class GroupedWindowListApplet extends Applet.Applet {

if(this.state.dragging.isForeign) {
if (this.state.dragging.dragPlaceholder)
currentWorkspace.actor.set_child_at_index(this.state.dragging.dragPlaceholder.actor, pos);
currentWorkspace.container.set_child_at_index(this.state.dragging.dragPlaceholder.actor, pos);
else {
const iconSize = this.getPanelIconSize() * global.ui_scale;
this.state.dragging.dragPlaceholder = new DND.GenericDragPlaceholderItem();
this.state.dragging.dragPlaceholder.child.width = iconSize;
this.state.dragging.dragPlaceholder.child.height = iconSize;
currentWorkspace.actor.insert_child_at_index(
currentWorkspace.container.insert_child_at_index(
this.state.dragging.dragPlaceholder.actor,
this.state.dragging.pos
);
this.state.dragging.dragPlaceholder.animateIn();
}
}
else
currentWorkspace.actor.set_child_at_index(source.actor, pos);
currentWorkspace.container.set_child_at_index(source.actor, pos);
}

if(this.state.dragging.isForeign)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const constants = {
FLASH_INTERVAL: 500,
FLASH_MAX_COUNT: 4,
RESERVE_KEYS: ['willUnmount'],
SCROLL_TO_APP_DEBOUNCE_TIME: 100,
TitleDisplay: {
None: 1,
App: 2,
Expand Down
Loading
Loading