Commit 663443a2 authored by Guido Gunther's avatar Guido Gunther Committed by Sebastian Krzyszkowiak
Browse files

proximity: Handle NULL builtin monitor

There might be no builtin monitor at all or it could be disabled.
Signed-off-by: Guido Gunther's avatarGuido Günther <>
parent dcfcc373
......@@ -148,15 +148,15 @@ on_proximity_near_changed (PhoshProximity *self,
PhoshSensorProxyManager *sensor)
gboolean near;
PhoshShell *shell = phosh_shell_get_default ();
PhoshMonitor *monitor = phosh_shell_get_builtin_monitor (shell);
near = phosh_dbus_sensor_proxy_get_proximity_near (
PHOSH_DBUS_SENSOR_PROXY (self->sensor_proxy_manager));
g_debug ("Proximity near changed: %d", near);
if (near) {
PhoshShell *shell = phosh_shell_get_default ();
if (near && monitor) {
PhoshWayland *wl = phosh_wayland_get_default ();
PhoshMonitor *monitor = phosh_shell_get_builtin_monitor (shell);
if (!self->fader) {
self->fader = phosh_fader_new (phosh_wayland_get_zwlr_layer_shell_v1 (wl),
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