grim/guifications2

replaced some deprecated code

2011-12-04, Gary Kramlich
f9913f21fd82
Parents 7457f8a611e7
Children 84ee43f92027
replaced some deprecated code
--- a/src/x11/gf_x11_display.c Sun Dec 04 16:14:08 2011 -0600
+++ b/src/x11/gf_x11_display.c Sun Dec 04 16:14:30 2011 -0600
@@ -139,6 +139,8 @@
gboolean
gf_display_screen_saver_is_running(void) {
+ GdkDisplay *g_display = NULL;
+ Display *x_display = NULL;
static Atom xss, locked, blanked;
static gboolean init = FALSE;
Atom ratom;
@@ -147,14 +149,17 @@
gulong items, padding;
gboolean ret = FALSE;
+ g_display = gdk_display_get_default();
+ x_display = gdk_x11_display_get_xdisplay(g_display);
+
if(!init) {
- xss = XInternAtom(GDK_DISPLAY(),"_SCREENSAVER_STATUS", FALSE);
- locked = XInternAtom(GDK_DISPLAY(), "LOCK", FALSE);
- blanked = XInternAtom(GDK_DISPLAY(), "BLANK", FALSE);
+ xss = XInternAtom(x_display,"_SCREENSAVER_STATUS", FALSE);
+ locked = XInternAtom(x_display, "LOCK", FALSE);
+ blanked = XInternAtom(x_display, "BLANK", FALSE);
init = TRUE;
}
- if(XGetWindowProperty(GDK_DISPLAY(), GDK_ROOT_WINDOW(), xss, 0, 999, FALSE,
+ if(XGetWindowProperty(x_display, GDK_ROOT_WINDOW(), xss, 0, 999, FALSE,
XA_INTEGER, &ratom, &rtatom, &items, &padding, &data)
== Success)
{