Repository navigation
fix(layershell): stabilize compositor interactive resize (u3) #1845
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
wjyrich
merged 1 commit into
linuxdeepin:develop/2500u3
from
wjyrich:backport/1841-develop-2500u3
Nov 24, 2026
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| // SPDX-FileCopyrightText: 2026 UnionTech Software Technology Co., Ltd. | ||
| // | ||
| // SPDX-License-Identifier: GPL-3.0-or-later | ||
|
|
||
| #include "layershellextension_p.h" | ||
|
|
||
| #include <QCoreApplication> | ||
| #include <QPointer> | ||
|
|
||
| DS_BEGIN_NAMESPACE | ||
|
|
||
| TreeLandLayerShellExtensionManager::TreeLandLayerShellExtensionManager() | ||
| : QWaylandClientExtensionTemplate<TreeLandLayerShellExtensionManager>(1) | ||
| { | ||
| initialize(); | ||
| } | ||
|
|
||
| TreeLandLayerShellExtensionManager::~TreeLandLayerShellExtensionManager() | ||
| { | ||
| if (isInitialized()) | ||
| destroy(); | ||
| } | ||
|
|
||
| TreeLandLayerShellExtensionManager *TreeLandLayerShellExtensionManager::instance() | ||
| { | ||
| static QPointer<TreeLandLayerShellExtensionManager> manager; | ||
| if (!manager) { | ||
| manager = new TreeLandLayerShellExtensionManager; | ||
| manager->setParent(qApp); | ||
| } | ||
| return manager; | ||
| } | ||
|
|
||
| TreeLandLayerShellExtensionObject::TreeLandLayerShellExtensionObject(struct ::treeland_layer_shell_extension_object_v1 *object) | ||
| : QtWayland::treeland_layer_shell_extension_object_v1(object) | ||
| { | ||
| } | ||
|
|
||
| TreeLandLayerShellExtensionObject::~TreeLandLayerShellExtensionObject() | ||
| { | ||
| if (isInitialized()) | ||
| destroy(); | ||
| } | ||
|
|
||
| void TreeLandLayerShellExtensionObject::treeland_layer_shell_extension_object_v1_resizing(uint32_t resizing) | ||
| { | ||
| Q_EMIT resizingChanged(resizing != 0); | ||
| } | ||
|
|
||
| void TreeLandLayerShellExtensionObject::treeland_layer_shell_extension_object_v1_resize_rejected(uint32_t error) | ||
| { | ||
| Q_EMIT resizeRejected(error); | ||
| } | ||
|
|
||
| DS_END_NAMESPACE | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| // SPDX-FileCopyrightText: 2026 UnionTech Software Technology Co., Ltd. | ||
| // | ||
| // SPDX-License-Identifier: GPL-3.0-or-later | ||
|
|
||
| #pragma once | ||
|
|
||
| #include "dsglobal.h" | ||
| #include "qwayland-treeland-layer-shell-extension-unstable-v1.h" | ||
|
|
||
| #include <QtWaylandClient/QWaylandClientExtension> | ||
|
|
||
| DS_BEGIN_NAMESPACE | ||
|
|
||
| class TreeLandLayerShellExtensionManager : public QWaylandClientExtensionTemplate<TreeLandLayerShellExtensionManager>, | ||
| public QtWayland::treeland_layer_shell_extension_manager_v1 | ||
| { | ||
| Q_OBJECT | ||
| public: | ||
| TreeLandLayerShellExtensionManager(); | ||
| ~TreeLandLayerShellExtensionManager() override; | ||
|
|
||
| static TreeLandLayerShellExtensionManager *instance(); | ||
| }; | ||
|
|
||
| // Owned by the layer shell surface, and destroyed before its wl_surface. | ||
| class TreeLandLayerShellExtensionObject : public QObject, | ||
| public QtWayland::treeland_layer_shell_extension_object_v1 | ||
| { | ||
| Q_OBJECT | ||
| public: | ||
| explicit TreeLandLayerShellExtensionObject(struct ::treeland_layer_shell_extension_object_v1 *object); | ||
| ~TreeLandLayerShellExtensionObject() override; | ||
|
|
||
| Q_SIGNALS: | ||
| void resizingChanged(bool resizing); | ||
| void resizeRejected(uint32_t error); | ||
|
|
||
| protected: | ||
| void treeland_layer_shell_extension_object_v1_resizing(uint32_t resizing) override; | ||
| void treeland_layer_shell_extension_object_v1_resize_rejected(uint32_t error) override; | ||
| }; | ||
|
|
||
| DS_END_NAMESPACE | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 Medium · Final dock size is lost
When the output changes while a resize is active and the latest configure has not yet been applied, the surface destructor clears the resizing state without calling
finishResize(), so it never adoptsm_pendingSizeor emitsresizeFinished. The QML resizing-state handler then persists the last reflecteddockSize, which can be older than the final configure, and the recreated surface shows the wrong size.Finalize and persist the pending resize size before destroying the shell surface during recreation.
Prompt for AI agents