Skip to content

Commit 5af60b3

Browse files
committed
compositor: Add meta_get_stage_xwindow().
Needed for native screensaver backup-locker window.
1 parent b22558c commit 5af60b3

3 files changed

Lines changed: 29 additions & 0 deletions

File tree

debian/libmuffin0.symbols

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2211,6 +2211,7 @@ libmuffin.so.0 libmuffin0 #MINVER#
22112211
meta_get_option_context@Base 5.3.0
22122212
meta_get_replace_current_wm@Base 5.3.0
22132213
meta_get_stage_for_display@Base 5.3.0
2214+
meta_get_stage_xwindow@Base 6.6.3
22142215
meta_get_top_window_group_for_display@Base 5.3.0
22152216
meta_get_window_actors@Base 5.3.0
22162217
meta_get_window_group_for_display@Base 5.3.0

src/compositor/compositor.c

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1773,6 +1773,31 @@ meta_get_desklet_container_for_display (MetaDisplay *display)
17731773
return priv->desklet_container;
17741774
}
17751775

1776+
/**
1777+
* meta_get_stage_xwindow:
1778+
* @display: a #MetaDisplay
1779+
*
1780+
* Returns the X11 window ID of the stage window backing the compositor.
1781+
*
1782+
* Returns: The X11 Window ID, or 0 if not available
1783+
*/
1784+
gulong
1785+
meta_get_stage_xwindow (MetaDisplay *display)
1786+
{
1787+
ClutterStage *stage;
1788+
1789+
g_return_val_if_fail (display != NULL, 0);
1790+
1791+
if (meta_is_wayland_compositor ())
1792+
return 0;
1793+
1794+
stage = CLUTTER_STAGE (meta_get_stage_for_display (display));
1795+
if (!stage)
1796+
return 0;
1797+
1798+
return (gulong) meta_x11_get_stage_window (stage);
1799+
}
1800+
17761801
void
17771802
meta_update_desklet_stacking (MetaCompositor *compositor)
17781803
{

src/meta/compositor-muffin.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,7 @@ ClutterActor *meta_get_x11_background_actor_for_display (MetaDisplay *display);
6666
META_EXPORT
6767
ClutterActor *meta_get_desklet_container_for_display (MetaDisplay *display);
6868

69+
META_EXPORT
70+
gulong meta_get_stage_xwindow (MetaDisplay *display);
71+
6972
#endif

0 commit comments

Comments
 (0)