aboutsummaryrefslogtreecommitdiff
path: root/src/idle-monitor.vala
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2023-05-05 05:19:44 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2023-05-07 20:52:12 +0200
commit0718f264357a13b1a55cadcb7eb6a5774b7dd7eb (patch)
tree9c44342564d431dfaf24cd8f61d5d63c44171eed /src/idle-monitor.vala
parentc9b2de2b43d1575a85b5d0344c4a0bd1eb9f93fa (diff)
downloadarctica-greeter-0718f264357a13b1a55cadcb7eb6a5774b7dd7eb.tar.gz
arctica-greeter-0718f264357a13b1a55cadcb7eb6a5774b7dd7eb.tar.bz2
arctica-greeter-0718f264357a13b1a55cadcb7eb6a5774b7dd7eb.zip
Fix casting issues
Diffstat (limited to 'src/idle-monitor.vala')
-rw-r--r--src/idle-monitor.vala7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/idle-monitor.vala b/src/idle-monitor.vala
index 374e924..b8e8963 100644
--- a/src/idle-monitor.vala
+++ b/src/idle-monitor.vala
@@ -2,6 +2,7 @@
*
* Copyright (C) 2014 Canonical Ltd
* Copyright (C) 2017 Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
+ * Copyright (C) 2023 Robert Tari <robert@tari.in>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3 as
@@ -79,7 +80,11 @@ public class IdleMonitor
warning ("Only support idle monitor under X");
return;
}
- display = (d as Gdk.X11.Display).get_xdisplay ();
+
+ if (d is Gdk.X11.Display)
+ {
+ display = d.get_xdisplay ();
+ }
int sync_error_base;
var res = X.Sync.QueryExtension (display, out sync_event_base, out sync_error_base);