Skip to content


Browse files Browse the repository at this point in the history
Add meta_window_get_transient_for() method
NOTE: Patch copied from mutter and adapted for metacity.
  • Loading branch information
Davyd Madeley authored and vkareh committed Aug 28, 2018
1 parent a47f178 commit 4f47c5b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/core/window.c
Expand Up @@ -8630,6 +8630,29 @@ meta_window_get_xwindow (MetaWindow *window)
return window->xwindow;

* meta_window_get_transient_for:
* @window: a #MetaWindow
* Returns the #MetaWindow for the window that is pointed to by the
* WM_TRANSIENT_FOR hint on this window (see XGetTransientForHint()
* or XSetTransientForHint()). Metacity keeps transient windows above their
* parents. A typical usage of this hint is for a dialog that wants to stay
* above its associated window.
* Return value: (transfer none): the window this window is transient for, or
* %NULL if the WM_TRANSIENT_FOR hint is unset or does not point to a toplevel
* window that Metacity knows about.
MetaWindow *
meta_window_get_transient_for (MetaWindow *window)
if (window->xtransient_for)
return meta_display_lookup_x_window (window->display, window->xtransient_for);
return NULL;

meta_window_is_maximized (MetaWindow *window)
Expand Down
1 change: 1 addition & 0 deletions src/include/window.h
Expand Up @@ -35,6 +35,7 @@ MetaRectangle *meta_window_get_rect (MetaWindow *window);
MetaScreen *meta_window_get_screen (MetaWindow *window);
MetaDisplay *meta_window_get_display (MetaWindow *window);
Window meta_window_get_xwindow (MetaWindow *window);
MetaWindow *meta_window_get_transient_for (MetaWindow *window);
gboolean meta_window_is_maximized (MetaWindow *window);


0 comments on commit 4f47c5b

Please sign in to comment.