Start hacking out use of xtransient_for

It won't work under Wayland.
This commit is contained in:
Jasper St. Pierre
2014-03-18 10:12:44 -04:00
parent f11bf44525
commit ada9610e30
3 changed files with 8 additions and 17 deletions

View File

@ -261,8 +261,7 @@ meta_window_present_delete_dialog (MetaWindow *window, guint32 timestamp)
{ {
MetaWindow *w = tmp->data; MetaWindow *w = tmp->data;
if (w->xtransient_for == window->xwindow && if (w->transient_for == window && w->res_class &&
w->res_class &&
g_ascii_strcasecmp (w->res_class, "mutter-dialog") == 0) g_ascii_strcasecmp (w->res_class, "mutter-dialog") == 0)
{ {
meta_window_activate (w, timestamp); meta_window_activate (w, timestamp);

View File

@ -610,7 +610,7 @@ meta_window_place (MetaWindow *window,
meta_topic (META_DEBUG_PLACEMENT, "Placing window %s\n", window->desc); meta_topic (META_DEBUG_PLACEMENT, "Placing window %s\n", window->desc);
windows = NULL; windows = NULL;
switch (window->type) switch (window->type)
{ {
/* Run placement algorithm on these. */ /* Run placement algorithm on these. */
@ -638,7 +638,7 @@ meta_window_place (MetaWindow *window,
case META_WINDOW_OVERRIDE_OTHER: case META_WINDOW_OVERRIDE_OTHER:
goto done_no_constraints; goto done_no_constraints;
} }
if (meta_prefs_get_disable_workarounds ()) if (meta_prefs_get_disable_workarounds ())
{ {
switch (window->type) switch (window->type)
@ -699,18 +699,11 @@ meta_window_place (MetaWindow *window,
goto done_no_constraints; goto done_no_constraints;
} }
} }
if ((window->type == META_WINDOW_DIALOG ||
window->type == META_WINDOW_MODAL_DIALOG) &&
window->xtransient_for != None)
{
/* Center horizontally, at top of parent vertically */
MetaWindow *parent; if (window->type == META_WINDOW_DIALOG ||
window->type == META_WINDOW_MODAL_DIALOG)
parent = {
meta_display_lookup_x_window (window->display, MetaWindow *parent = meta_window_get_transient_for (window);
window->xtransient_for);
if (parent) if (parent)
{ {

View File

@ -1746,8 +1746,7 @@ get_default_focus_window (MetaStack *stack,
if (not_this_one != NULL) if (not_this_one != NULL)
{ {
if (transient_parent == NULL && if (transient_parent == NULL &&
not_this_one->xtransient_for != None && meta_window_get_transient_for (not_this_one) == window)
not_this_one->xtransient_for == window->xwindow)
transient_parent = window; transient_parent = window;
if (topmost_in_group == NULL && if (topmost_in_group == NULL &&