gjdwebserver-overlay/gui-wm/phosh/files/0003-shell-add-an-accessor-for-the-mode-manager.patch
Gerben Jan Dijkman cdac3cd7f0 Added phosh
2021-06-17 15:02:06 +02:00

51 lines
1.7 KiB
Diff

From 50cffaa899230af7ac3d24c7e76f3a7e4dbac519 Mon Sep 17 00:00:00 2001
From: Arnaud Ferraris <arnaud.ferraris@collabora.com>
Date: Tue, 27 Oct 2020 15:07:37 +0100
Subject: [PATCH 45/47] shell: add an accessor for the mode manager
Other modules should be able to query the device type too.
---
src/shell.c | 13 +++++++++++++
src/shell.h | 1 +
2 files changed, 14 insertions(+)
diff --git a/src/shell.c b/src/shell.c
index 19a41fb..48dd4c2 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -815,6 +815,19 @@ phosh_shell_get_lockscreen_manager (PhoshShell *self)
}
+PhoshModeManager *
+phosh_shell_get_mode_manager (PhoshShell *self)
+{
+ PhoshShellPrivate *priv;
+
+ g_return_val_if_fail (PHOSH_IS_SHELL (self), NULL);
+ priv = phosh_shell_get_instance_private (self);
+
+ g_return_val_if_fail (PHOSH_IS_MODE_MANAGER (priv->mode_manager), NULL);
+ return priv->mode_manager;
+}
+
+
PhoshMonitorManager *
phosh_shell_get_monitor_manager (PhoshShell *self)
{
diff --git a/src/shell.h b/src/shell.h
index 65680a5..541203d 100644
--- a/src/shell.h
+++ b/src/shell.h
@@ -47,6 +47,7 @@ void phosh_shell_set_primary_monitor (PhoshShell *self, PhoshMon
PhoshMonitor *phosh_shell_get_primary_monitor (PhoshShell *self);
PhoshMonitor *phosh_shell_get_builtin_monitor (PhoshShell *self);
PhoshLockscreenManager *phosh_shell_get_lockscreen_manager (PhoshShell *self);
+PhoshModeManager *phosh_shell_get_mode_manager (PhoshShell *self);
PhoshMonitorManager *phosh_shell_get_monitor_manager (PhoshShell *self);
PhoshOskManager *phosh_shell_get_osk_manager (PhoshShell *self);
PhoshToplevelManager *phosh_shell_get_toplevel_manager (PhoshShell *self);
--
2.28.0