aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2014-11-04 15:49:06 +1300
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2015-10-27 17:02:36 +0100
commit269ff16dcdb3eda3a74e4b3088714cc7a089c817 (patch)
tree7f4dfa174e91613fa15e672a81c24e13f1703cd8
parentaa5077fe5662db6a4bb4cbf26939bc90ea778f80 (diff)
downloadarctica-greeter-269ff16dcdb3eda3a74e4b3088714cc7a089c817.tar.gz
arctica-greeter-269ff16dcdb3eda3a74e4b3088714cc7a089c817.tar.bz2
arctica-greeter-269ff16dcdb3eda3a74e4b3088714cc7a089c817.zip
Don't use deprecated Gdk X11 API
Ported to ArcticaGreeter: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
-rw-r--r--src/arctica-greeter.vala18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/arctica-greeter.vala b/src/arctica-greeter.vala
index 1c23bf4..44a0fc9 100644
--- a/src/arctica-greeter.vala
+++ b/src/arctica-greeter.vala
@@ -325,15 +325,15 @@ public class ArcticaGreeter
var xevent = (X.Event*)gxevent;
if (xevent.type == X.EventType.MapNotify)
{
- var display = Gdk.x11_lookup_xdisplay (xevent.xmap.display);
+ var display = Gdk.X11.Display.lookup_for_xdisplay (xevent.xmap.display);
var xwin = xevent.xmap.window;
- var win = Gdk.X11Window.foreign_new_for_display (display, xwin);
+ var win = new Gdk.X11.Window.foreign_for_display (display, xwin);
if (win != null && !xevent.xmap.override_redirect)
{
/* 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 = Gdk.X11Window.get_xid (main_window.menubar.keyboard_window.get_window ());
+ keyboard_xid = (main_window.menubar.keyboard_window.get_window () as Gdk.X11.Window).get_xid ();
if (xwin != keyboard_xid && win.get_type_hint() != Gdk.WindowTypeHint.NOTIFICATION)
{
@@ -386,10 +386,10 @@ public class ArcticaGreeter
{
var visual = screen.get_system_visual ();
- unowned X.Display display = Gdk.X11Display.get_xdisplay (screen.get_display ());
+ unowned X.Display display = (screen.get_display () as Gdk.X11.Display).get_xdisplay ();
var pixmap = X.CreatePixmap (display,
- Gdk.X11Window.get_xid (screen.get_root_window ()),
+ (screen.get_root_window () as Gdk.X11.Window).get_xid (),
screen.get_width (),
screen.get_height (),
visual.get_depth ());
@@ -397,7 +397,7 @@ public class ArcticaGreeter
/* Convert into a Cairo surface */
var surface = new Cairo.XlibSurface (display,
pixmap,
- Gdk.X11Visual.get_xvisual (visual),
+ (visual as Gdk.X11.Visual).get_xvisual (),
screen.get_width (), screen.get_height ());
return surface;
@@ -407,16 +407,16 @@ public class ArcticaGreeter
{
Gdk.flush ();
- unowned X.Display display = Gdk.X11Display.get_xdisplay (screen.get_display ());
+ unowned X.Display display = (screen.get_display () as Gdk.X11.Display).get_xdisplay ();
/* Ensure Cairo has actually finished its drawing */
surface.flush ();
/* Use this pixmap for the background */
X.SetWindowBackgroundPixmap (display,
- Gdk.X11Window.get_xid (screen.get_root_window ()),
+ (screen.get_root_window () as Gdk.X11.Window).get_xid (),
surface.get_drawable ());
- X.ClearWindow (display, Gdk.X11Window.get_xid (screen.get_root_window ()));
+ X.ClearWindow (display, (screen.get_root_window () as Gdk.X11.Window).get_xid ());
}
private static void log_cb (string? log_domain, LogLevelFlags log_level, string message)