mirror of
https://github.com/brl/mutter.git
synced 2024-11-24 17:10:40 -05:00
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
(cherry picked from commit 912a6f5e3f
)
This commit is contained in:
parent
fe1616668e
commit
3288edf677
@ -886,7 +886,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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user