Updating 47/vertical-workspaces to version 47.5+20250210 [b14ba3cf].
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
297ae772ab
commit
6b0458069f
26 changed files with 5479 additions and 3202 deletions
|
@ -78,17 +78,19 @@ export const WorkspaceModule = class {
|
|||
}
|
||||
};
|
||||
|
||||
// workaround for upstream bug (that is not that invisible in default shell)
|
||||
// smaller window cannot be scaled below 0.95 (WINDOW_PREVIEW_MAXIMUM_SCALE)
|
||||
// when its target scale for exposed windows view (workspace state 1) is bigger than the scale needed for ws state 0.
|
||||
// in workspace state 0 where windows are not spread and window scale should follow workspace scale,
|
||||
// this window follows proper top left corner position, but doesn't scale with the workspace
|
||||
// so it looks bad and the window can exceed border of the workspace
|
||||
// extremely annoying in OVERVIEW_MODE 1 with single smaller window on the workspace, also affects appGrid transition animation
|
||||
|
||||
// disadvantage of following workaround - the WINDOW_PREVIEW_MAXIMUM_SCALE value is common for every workspace,
|
||||
// on multi-monitor system can be visible unwanted scaling of windows on workspace in WORKSPACE_MODE 0 (windows not spread)
|
||||
// when leaving overview while any other workspace is in the WORKSPACE_MODE 1.
|
||||
// Workaround for an upstream bug affecting window scaling and positioning:
|
||||
//
|
||||
// Issue:
|
||||
// - Smaller windows cannot scale below 0.95 (WINDOW_PREVIEW_MAXIMUM_SCALE)
|
||||
// when their target scale for the spread windows view (workspace state 1)
|
||||
// exceeds the scale needed for workspace state 0.
|
||||
// - In workspace state 0 (where windows are not spread and scale matches the workspace),
|
||||
// the window aligns correctly to the top-left corner but does not scale with the workspace,
|
||||
// causing visual issues and the window may exceed the workspace border.
|
||||
//
|
||||
// Effects:
|
||||
// - Particularly noticeable in OVERVIEW_MODE 1 with a single smaller window on the workspace.
|
||||
// - Also impacts the appGrid transition animation.
|
||||
const WorkspaceLayout = {
|
||||
// injection to _init()
|
||||
after__init() {
|
||||
|
@ -96,14 +98,18 @@ const WorkspaceLayout = {
|
|||
WINDOW_PREVIEW_MAXIMUM_SCALE = 0.95;
|
||||
if (opt.OVERVIEW_MODE === 1) {
|
||||
this._stateAdjustment.connect('notify::value', () => {
|
||||
// scale 0.1 for window state 0 just needs to be smaller then possible scale of any window in spread view
|
||||
// When transitioning to workspace state 1 (WINDOW_PICKER),
|
||||
// replace the constant with the original value.
|
||||
// Ensure that the scale for workspace state 0 is smaller
|
||||
// than the minimum possible scale of any window on the workspace,
|
||||
// so they stay at their real size relative to ws preview
|
||||
const scale = this._stateAdjustment.value ? 0.95 : 0.1;
|
||||
if (scale !== WINDOW_PREVIEW_MAXIMUM_SCALE) {
|
||||
if (scale !== WINDOW_PREVIEW_MAXIMUM_SCALE)
|
||||
WINDOW_PREVIEW_MAXIMUM_SCALE = scale;
|
||||
// when transition to ws state 1 (WINDOW_PICKER) begins, replace the constant with the original one
|
||||
// and force recalculation of the target layout, so the transition will be smooth
|
||||
// Force recalculation of the target layout
|
||||
// to ensure that the new WINDOW_PREVIEW_MAXIMUM_SCALE is applied
|
||||
if (this._stateAdjustment.value < 0.5)
|
||||
this._needsLayout = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue