diff --git a/src/phosh.c b/src/phosh.c index 9223e63c34c0064aba4cc82c33b8f0cb83e2f0f0..bbd9653ba216b414233a7efed5495a945d09e560 100644 --- a/src/phosh.c +++ b/src/phosh.c @@ -868,6 +868,19 @@ phosh_shell_get_wl_layer_shell () } +PhoshMonitor * +phosh_shell_get_primary_monitor () +{ + PhoshShellPrivate *priv = phosh_shell_get_instance_private (_phosh); + PhoshMonitor *monitor; + + monitor = phosh_monitor_manager_get_monitor (priv->monitor_manager, 0); + g_return_val_if_fail (monitor, NULL); + + return monitor; +} + + /** * Returns the usable area in pixels usable by a client on the phone * display diff --git a/src/phosh.h b/src/phosh.h index 51c912a5c416089397595d9e82e3f3cbbec052cc..74bfbe55ffdd62e31bd0c1d35a93831c07b01f6e 100644 --- a/src/phosh.h +++ b/src/phosh.h @@ -8,6 +8,8 @@ #ifndef PHOSH_H #define PHOSH_H +#include "monitor/monitor.h" + #include <gtk/gtk.h> #define PHOSH_TYPE_SHELL phosh_shell_get_type() @@ -25,6 +27,7 @@ void phosh_shell_get_usable_area (PhoshShell *self, void phosh_shell_set_locked (PhoshShell *self, gboolean locked); void phosh_shell_lock (PhoshShell *self); void phosh_shell_unlock (PhoshShell *self); +PhoshMonitor *phosh_shell_get_primary_monitor (); /* Phosh keeps track of the wayland globals */ gpointer phosh_shell_get_wl_layer_shell ();