display: Don't grab transient's parent unconditionally

Since commit 6e8d1d79d, move operations are always performed for
the (toplevel) parent of all transient, which is just plain silly
if the dialog is not actually attached to its parent (either because
the dialog is not modal or the setting is disabled).
This commit is contained in:
Florian Müllner 2014-05-02 12:20:32 +02:00
parent f3a2bb7779
commit a6601e92aa

View File

@ -1773,7 +1773,8 @@ meta_display_begin_grab_op (MetaDisplay *display,
/* If window is a modal dialog attached to its parent, /* If window is a modal dialog attached to its parent,
* grab the parent instead for moving. * grab the parent instead for moving.
*/ */
if (meta_grab_op_is_moving (op)) if (window && meta_window_is_attached_dialog (window) &&
meta_grab_op_is_moving (op))
grab_window = get_toplevel_transient_for (window); grab_window = get_toplevel_transient_for (window);
g_assert (grab_window != NULL); g_assert (grab_window != NULL);