summaryrefslogtreecommitdiff
path: root/cut-n-paste
diff options
context:
space:
mode:
authorElias Aebi <[email protected]>2013-02-05 08:51:50 +0100
committerElias Aebi <[email protected]>2013-02-05 08:51:50 +0100
commitd2ccf9aec7fd655e83de51167d36b68f9d0a8bb7 (patch)
tree0c59e2391217f5ac8ee434ad665c17a2ce39c404 /cut-n-paste
parente90872de53b9026e1d372a833d9778dddc53fdbf (diff)
downloadeom-d2ccf9aec7fd655e83de51167d36b68f9d0a8bb7.tar.bz2
eom-d2ccf9aec7fd655e83de51167d36b68f9d0a8bb7.tar.xz
replace the deprecated GDK symbols
Diffstat (limited to 'cut-n-paste')
-rw-r--r--cut-n-paste/totem-screensaver/totem-scrsaver.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/cut-n-paste/totem-screensaver/totem-scrsaver.c b/cut-n-paste/totem-screensaver/totem-scrsaver.c
index bf2bce9..70fa788 100644
--- a/cut-n-paste/totem-screensaver/totem-scrsaver.c
+++ b/cut-n-paste/totem-screensaver/totem-scrsaver.c
@@ -290,13 +290,13 @@ screensaver_enable_x11 (TotemScrsaver *scr)
}
#endif /* HAVE_XTEST */
- XLockDisplay (GDK_DISPLAY());
- XSetScreenSaver (GDK_DISPLAY(),
+ XLockDisplay (gdk_x11_get_default_xdisplay());
+ XSetScreenSaver (gdk_x11_get_default_xdisplay(),
scr->priv->timeout,
scr->priv->interval,
scr->priv->prefer_blanking,
scr->priv->allow_exposures);
- XUnlockDisplay (GDK_DISPLAY());
+ XUnlockDisplay (gdk_x11_get_default_xdisplay());
}
#ifdef HAVE_XTEST
@@ -305,12 +305,12 @@ fake_event (TotemScrsaver *scr)
{
if (scr->priv->disabled)
{
- XLockDisplay (GDK_DISPLAY());
- XTestFakeKeyEvent (GDK_DISPLAY(), *scr->priv->keycode,
+ XLockDisplay (gdk_x11_get_default_xdisplay());
+ XTestFakeKeyEvent (gdk_x11_get_default_xdisplay(), *scr->priv->keycode,
True, CurrentTime);
- XTestFakeKeyEvent (GDK_DISPLAY(), *scr->priv->keycode,
+ XTestFakeKeyEvent (gdk_x11_get_default_xdisplay(), *scr->priv->keycode,
False, CurrentTime);
- XUnlockDisplay (GDK_DISPLAY());
+ XUnlockDisplay (gdk_x11_get_default_xdisplay());
/* Swap the keycode */
if (scr->priv->keycode == &scr->priv->keycode1)
scr->priv->keycode = &scr->priv->keycode2;
@@ -329,12 +329,12 @@ screensaver_disable_x11 (TotemScrsaver *scr)
#ifdef HAVE_XTEST
if (scr->priv->have_xtest != FALSE)
{
- XLockDisplay (GDK_DISPLAY());
- XGetScreenSaver(GDK_DISPLAY(), &scr->priv->timeout,
+ XLockDisplay (gdk_x11_get_default_xdisplay());
+ XGetScreenSaver(gdk_x11_get_default_xdisplay(), &scr->priv->timeout,
&scr->priv->interval,
&scr->priv->prefer_blanking,
&scr->priv->allow_exposures);
- XUnlockDisplay (GDK_DISPLAY());
+ XUnlockDisplay (gdk_x11_get_default_xdisplay());
if (scr->priv->timeout != 0) {
g_timeout_add_seconds (scr->priv->timeout / 2,
@@ -348,14 +348,14 @@ screensaver_disable_x11 (TotemScrsaver *scr)
}
#endif /* HAVE_XTEST */
- XLockDisplay (GDK_DISPLAY());
- XGetScreenSaver(GDK_DISPLAY(), &scr->priv->timeout,
+ XLockDisplay (gdk_x11_get_default_xdisplay());
+ XGetScreenSaver(gdk_x11_get_default_xdisplay(), &scr->priv->timeout,
&scr->priv->interval,
&scr->priv->prefer_blanking,
&scr->priv->allow_exposures);
- XSetScreenSaver(GDK_DISPLAY(), 0, 0,
+ XSetScreenSaver(gdk_x11_get_default_xdisplay(), 0, 0,
DontPreferBlanking, DontAllowExposures);
- XUnlockDisplay (GDK_DISPLAY());
+ XUnlockDisplay (gdk_x11_get_default_xdisplay());
}
static void
@@ -364,24 +364,24 @@ screensaver_init_x11 (TotemScrsaver *scr)
#ifdef HAVE_XTEST
int a, b, c, d;
- XLockDisplay (GDK_DISPLAY());
- scr->priv->have_xtest = (XTestQueryExtension (GDK_DISPLAY(), &a, &b, &c, &d) == True);
+ XLockDisplay (gdk_x11_get_default_xdisplay());
+ scr->priv->have_xtest = (XTestQueryExtension (gdk_x11_get_default_xdisplay(), &a, &b, &c, &d) == True);
if (scr->priv->have_xtest != FALSE)
{
- scr->priv->keycode1 = XKeysymToKeycode (GDK_DISPLAY(), XK_Alt_L);
+ scr->priv->keycode1 = XKeysymToKeycode (gdk_x11_get_default_xdisplay(), XK_Alt_L);
if (scr->priv->keycode1 == 0) {
g_warning ("scr->priv->keycode1 not existant");
}
- scr->priv->keycode2 = XKeysymToKeycode (GDK_DISPLAY(), XK_Alt_R);
+ scr->priv->keycode2 = XKeysymToKeycode (gdk_x11_get_default_xdisplay(), XK_Alt_R);
if (scr->priv->keycode2 == 0) {
- scr->priv->keycode2 = XKeysymToKeycode (GDK_DISPLAY(), XK_Alt_L);
+ scr->priv->keycode2 = XKeysymToKeycode (gdk_x11_get_default_xdisplay(), XK_Alt_L);
if (scr->priv->keycode2 == 0) {
g_warning ("scr->priv->keycode2 not existant");
}
}
scr->priv->keycode = &scr->priv->keycode1;
}
- XUnlockDisplay (GDK_DISPLAY());
+ XUnlockDisplay (gdk_x11_get_default_xdisplay());
#endif /* HAVE_XTEST */
}