diff options
author | Robert Tari <robert@tari.in> | 2023-05-05 05:19:44 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2023-05-07 20:52:12 +0200 |
commit | 0718f264357a13b1a55cadcb7eb6a5774b7dd7eb (patch) | |
tree | 9c44342564d431dfaf24cd8f61d5d63c44171eed /src/arctica-greeter.vala | |
parent | c9b2de2b43d1575a85b5d0344c4a0bd1eb9f93fa (diff) | |
download | arctica-greeter-0718f264357a13b1a55cadcb7eb6a5774b7dd7eb.tar.gz arctica-greeter-0718f264357a13b1a55cadcb7eb6a5774b7dd7eb.tar.bz2 arctica-greeter-0718f264357a13b1a55cadcb7eb6a5774b7dd7eb.zip |
Fix casting issues
Diffstat (limited to 'src/arctica-greeter.vala')
-rw-r--r-- | src/arctica-greeter.vala | 20 |
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); |