diff options
author | Olivier Fourdan <ofourdan@redhat.com> | 2018-07-08 16:23:25 +0200 |
---|---|---|
committer | Olivier Fourdan <ofourdan@redhat.com> | 2018-07-10 16:51:50 +0200 |
commit | 912a6f5e3f86040b75c18ce2e2c26ffd9a7925ee (patch) | |
tree | cad1ca00b3aa88265d533117a395f47f0e6f87d6 | |
parent | 89162a90aadce266a17fc67aa03162e473adb2e0 (diff) | |
download | mutter-912a6f5e3f86040b75c18ce2e2c26ffd9a7925ee.tar.gz |
contraints: Do not constrain modals without parent
xdg-foreign clears the `transient_for` of a modal dialog when its
imported parent is destroyed, which would later cause a crash in
`constrain_modal_dialog()` because the transient `NULL`.
So in case a modal dialog has no parent, do not try to constrain it
against its parent.
Closes: https://gitlab.gnome.org/GNOME/mutter/issues/174
-rw-r--r-- | src/core/constraints.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/constraints.c b/src/core/constraints.c index f84ef7d61..73b4b96ea 100644 --- a/src/core/constraints.c +++ b/src/core/constraints.c @@ -887,7 +887,8 @@ constrain_modal_dialog (MetaWindow *window, MetaRectangle child_rect, parent_rect; gboolean constraint_already_satisfied; - if (!meta_window_is_attached_dialog (window) || + if (!parent || + !meta_window_is_attached_dialog (window) || meta_window_get_placement_rule (window)) return TRUE; |