window: Properly get workspace of transient windows of popups
We set the workspace of popup windows to the same workspace as their
transient window, but since the transient window can also be present on
all workspaces while the popup should only be on one workspace, we'd set
the workspace of the popup to NULL if we use transient_for->workspace
directly. Instead, get the workspace of the transient window using
meta_window_get_workspace
, which returns the current workspace in case
the transient window is shown on all workspaces.
This fixes a bug which was exposed by 09bab98b
where popup windows opened on secondary monitors would reach the
g_assert_not_reached
inside meta_window_get_workspaces
. That
happened because on secondary monitors workspaces are disabled by
default, so the workspace of the transient window would be NULL and the
workspace of the popup window would get set to NULL.
Fixes #703 (closed)