[mutter/wayland] Start hacking out use of xtransient_for
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wayland] Start hacking out use of xtransient_for
- Date: Tue, 18 Mar 2014 14:26:25 +0000 (UTC)
commit ada9610e30de5bbab013c40227cdaa06f19a1ae7
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Tue Mar 18 10:12:44 2014 -0400
Start hacking out use of xtransient_for
It won't work under Wayland.
src/core/delete.c | 3 +--
src/core/place.c | 19 ++++++-------------
src/core/stack.c | 3 +--
3 files changed, 8 insertions(+), 17 deletions(-)
---
diff --git a/src/core/delete.c b/src/core/delete.c
index 9cfa715..b86dcf3 100644
--- a/src/core/delete.c
+++ b/src/core/delete.c
@@ -261,8 +261,7 @@ meta_window_present_delete_dialog (MetaWindow *window, guint32 timestamp)
{
MetaWindow *w = tmp->data;
- if (w->xtransient_for == window->xwindow &&
- w->res_class &&
+ if (w->transient_for == window && w->res_class &&
g_ascii_strcasecmp (w->res_class, "mutter-dialog") == 0)
{
meta_window_activate (w, timestamp);
diff --git a/src/core/place.c b/src/core/place.c
index 8894114..613f270 100644
--- a/src/core/place.c
+++ b/src/core/place.c
@@ -610,7 +610,7 @@ meta_window_place (MetaWindow *window,
meta_topic (META_DEBUG_PLACEMENT, "Placing window %s\n", window->desc);
windows = NULL;
-
+
switch (window->type)
{
/* Run placement algorithm on these. */
@@ -638,7 +638,7 @@ meta_window_place (MetaWindow *window,
case META_WINDOW_OVERRIDE_OTHER:
goto done_no_constraints;
}
-
+
if (meta_prefs_get_disable_workarounds ())
{
switch (window->type)
@@ -699,18 +699,11 @@ meta_window_place (MetaWindow *window,
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;
-
- parent =
- meta_display_lookup_x_window (window->display,
- window->xtransient_for);
+ if (window->type == META_WINDOW_DIALOG ||
+ window->type == META_WINDOW_MODAL_DIALOG)
+ {
+ MetaWindow *parent = meta_window_get_transient_for (window);
if (parent)
{
diff --git a/src/core/stack.c b/src/core/stack.c
index 4a34811..c9223cc 100644
--- a/src/core/stack.c
+++ b/src/core/stack.c
@@ -1746,8 +1746,7 @@ get_default_focus_window (MetaStack *stack,
if (not_this_one != NULL)
{
if (transient_parent == NULL &&
- not_this_one->xtransient_for != None &&
- not_this_one->xtransient_for == window->xwindow)
+ meta_window_get_transient_for (not_this_one) == window)
transient_parent = window;
if (topmost_in_group == NULL &&
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]