Commit 58737038 authored by Guido Gunther's avatar Guido Gunther

Monitor: Allow to detect flipped outputs

Signed-off-by: Guido Gunther's avatarGuido Günther <guido.gunther@puri.sm>
parent f8f37688
......@@ -351,3 +351,27 @@ phosh_monitor_is_builtin (PhoshMonitor *self)
return FALSE;
}
}
/** phosh_monitor_is_flipped
*
* Is the monitor's output flipped
*/
gboolean
phosh_monitor_is_flipped (PhoshMonitor *self)
{
switch (self->transform) {
case WL_OUTPUT_TRANSFORM_FLIPPED_90:
case WL_OUTPUT_TRANSFORM_FLIPPED_270:
case WL_OUTPUT_TRANSFORM_FLIPPED:
case WL_OUTPUT_TRANSFORM_FLIPPED_180:
return TRUE;
case WL_OUTPUT_TRANSFORM_90:
case WL_OUTPUT_TRANSFORM_270:
case WL_OUTPUT_TRANSFORM_NORMAL:
case WL_OUTPUT_TRANSFORM_180:
return FALSE;
default:
g_assert_not_reached ();
}
}
......@@ -76,3 +76,4 @@ PhoshMonitor * phosh_monitor_new_from_wl_output (gpointer wl_output);
PhoshMonitorMode * phosh_monitor_get_current_mode (PhoshMonitor *monitor);
gboolean phosh_monitor_is_configured (PhoshMonitor *monitor);
gboolean phosh_monitor_is_builtin (PhoshMonitor *monitor);
gboolean phosh_monitor_is_flipped (PhoshMonitor *monitor);
......@@ -3,7 +3,7 @@
* SPDX-License-Identifier: GPL-3.0+
* Author: Guido Günther <agx@sigxcpu.org>
*
* Based on maynard's panel which is
* Once based on maynard's panel which is
* Copyright (C) 2014 Collabora Ltd. *
* Author: Jonny Lamb <jonny.lamb@collabora.co.uk>
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment