mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
windowPreview: Handle case where window already is part of layout
We sometimes add dialogs multiple times to the WindowPreview, for example for modal dialogs we receive both the "window-added" and the "window-entered-monitor" signal, which means we call WindowPreview.addDialog() twice. We handle that fine already in the WindowPreviewLayout and return NULL in case the window already was added, so simply handle that NULL return value and bail out of WindowPreview.addDialog() in this case. https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1482
This commit is contained in:
parent
d318bf539d
commit
0b2430128a
1 changed files with 2 additions and 0 deletions
|
|
@ -500,6 +500,8 @@ var WindowPreview = GObject.registerClass({
|
|||
|
||||
_addWindow(metaWindow) {
|
||||
const clone = this._windowContainer.layout_manager.addWindow(metaWindow);
|
||||
if (!clone)
|
||||
return;
|
||||
|
||||
// We expect this to be used for all interaction rather than
|
||||
// the ClutterClone; as the former is reactive and the latter
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue