Skip to content
Merged
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
30 changes: 21 additions & 9 deletions src/manager/event_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,25 +150,37 @@ function applyEffectTo(actor: RoundedWindowActor) {
// that? I have no idea. But without that, weird bugs can happen. For
// example, when using Dash to Dock, all opened windows will be invisible
// *unless they are pinned in the dock*. So yeah, GNOME is magic.
connect(actor, 'notify::size', () => handlers.onSizeChanged(actor));
connect(actor, 'notify::size', () => {
if (actor.metaWindow) {
handlers.onSizeChanged(actor);
}
});
connect(texture, 'size-changed', () => {
handlers.onSizeChanged(actor);
if (actor.metaWindow) {
handlers.onSizeChanged(actor);
}
});

// Get notified about fullscreen explicitly, since a window must not change in
// size to go fullscreen
connect(actor.metaWindow, 'notify::fullscreen', () =>
handlers.onSizeChanged(actor),
);
connect(actor.metaWindow, 'notify::fullscreen', () => {
if (actor.metaWindow) {
handlers.onSizeChanged(actor);
}
});

// Window focus changed.
connect(actor.metaWindow, 'notify::appears-focused', () =>
handlers.onFocusChanged(actor),
);
connect(actor.metaWindow, 'notify::appears-focused', () => {
if (actor.metaWindow) {
handlers.onFocusChanged(actor);
}
});

// Workspace or monitor of the window changed.
connect(actor.metaWindow, 'workspace-changed', () => {
handlers.onFocusChanged(actor);
if (actor.metaWindow) {
handlers.onFocusChanged(actor);
}
});

handlers.onAddEffect(actor);
Expand Down
Loading