aboutsummaryrefslogtreecommitdiff
path: root/src/arctica-greeter.vala
diff options
context:
space:
mode:
Diffstat (limited to 'src/arctica-greeter.vala')
-rw-r--r--src/arctica-greeter.vala20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/arctica-greeter.vala b/src/arctica-greeter.vala
index 82d679e..9911f87 100644
--- a/src/arctica-greeter.vala
+++ b/src/arctica-greeter.vala
@@ -592,7 +592,10 @@ public class ArcticaGreeter : Object
/* Check to see if this window is our onboard window, since we don't want to focus it. */
X.Window keyboard_xid = 0;
if (main_window.menubar.keyboard_window != null)
- keyboard_xid = (main_window.menubar.keyboard_window.get_window () as Gdk.X11.Window).get_xid ();
+ {
+ Gdk.X11.Window pWindow = (Gdk.X11.Window) main_window.menubar.keyboard_window.get_window ();
+ keyboard_xid = pWindow.get_xid ();
+ }
if (xwin != keyboard_xid && win.get_type_hint() != Gdk.WindowTypeHint.NOTIFICATION)
{
@@ -650,20 +653,22 @@ public class ArcticaGreeter : Object
private static Cairo.XlibSurface? create_root_surface (Gdk.Screen screen)
{
var visual = screen.get_system_visual ();
-
- unowned X.Display display = (screen.get_display () as Gdk.X11.Display).get_xdisplay ();
- unowned X.Screen xscreen = (screen as Gdk.X11.Screen).get_xscreen ();
+ Gdk.X11.Display pDisplay = (Gdk.X11.Display) screen.get_display ();
+ unowned X.Display display = pDisplay.get_xdisplay ();
+ Gdk.X11.Screen pScreen = (Gdk.X11.Screen) screen;
+ unowned X.Screen xscreen = pScreen.get_xscreen ();
var pixmap = X.CreatePixmap (display,
- (screen.get_root_window () as Gdk.X11.Window).get_xid (),
+ ((Gdk.X11.Window) (screen.get_root_window ())).get_xid (),
xscreen.width_of_screen (),
xscreen.height_of_screen (),
visual.get_depth ());
/* Convert into a Cairo surface */
+ Gdk.X11.Visual pVisual = (Gdk.X11.Visual) visual;
var surface = new Cairo.XlibSurface (display,
pixmap,
- (visual as Gdk.X11.Visual).get_xvisual (),
+ pVisual.get_xvisual (),
xscreen.width_of_screen (), xscreen.height_of_screen ());
return surface;
@@ -1223,7 +1228,8 @@ public class ArcticaGreeter : Object
}
var screen = Gdk.Screen.get_default ();
- unowned X.Display xdisplay = (screen.get_display () as Gdk.X11.Display).get_xdisplay ();
+ Gdk.X11.Display pDisplay = (Gdk.X11.Display) screen.get_display ();
+ unowned X.Display xdisplay = pDisplay.get_xdisplay ();
var window = xdisplay.default_root_window();
var atom = xdisplay.intern_atom ("AT_SPI_BUS", true);