From e28e7a72aab78f62f2591f21ed12c0be2493cf82 Mon Sep 17 00:00:00 2001 From: Tomas Frydrych Date: Wed, 17 Mar 2010 09:15:55 +0000 Subject: [PATCH] [MetaDisplay] meta_display_get_leader_window() This function returns xid of the WM leader window (as defined by the _NET_SUPPORTING_WM_CHECK mechanism of EWMH). For use by plugins that wish to attach custom properties to this window. https://bugzilla.gnome.org/show_bug.cgi?id=613125 --- src/core/display.c | 16 ++++++++++++++++ src/include/display.h | 2 ++ 2 files changed, 18 insertions(+) diff --git a/src/core/display.c b/src/core/display.c index c6536e1bb..c160028b2 100644 --- a/src/core/display.c +++ b/src/core/display.c @@ -5405,3 +5405,19 @@ Atom meta_display_get_atom (MetaDisplay *display, MetaAtom meta_atom) return atoms[meta_atom - 1]; } + +/** + * meta_display_get_leader_window: + * @display: a #MetaDisplay + * + * Returns the window manager's leader window (as defined by the + * _NET_SUPPORTING_WM_CHECK mechanism of EWMH). For use by plugins that wish + * to attach additional custom properties to this window. + * + * Return value: (transfer none): xid of the leader window. + **/ +Window +meta_display_get_leader_window (MetaDisplay *display) +{ + return display->leader_window; +} diff --git a/src/include/display.h b/src/include/display.h index 78e4187ce..ee63fdaef 100644 --- a/src/include/display.h +++ b/src/include/display.h @@ -154,4 +154,6 @@ void meta_display_focus_the_no_focus_window (MetaDisplay *display, GSList *meta_display_sort_windows_by_stacking (MetaDisplay *display, GSList *windows); +Window meta_display_get_leader_window (MetaDisplay *display); + #endif