diff options
author | Perberos <[email protected]> | 2012-01-30 12:56:46 -0300 |
---|---|---|
committer | Perberos <[email protected]> | 2012-01-30 12:56:46 -0300 |
commit | 624c3c083c0d2deb17711e1bf880d43e3c3f3435 (patch) | |
tree | 8c5b017e19191c8908dda0248bda2e62f2cd77be | |
parent | 2509a50ebe4f3af9530d060a2ca1567cbc564445 (diff) | |
download | mate-session-manager-624c3c083c0d2deb17711e1bf880d43e3c3f3435.tar.bz2 mate-session-manager-624c3c083c0d2deb17711e1bf880d43e3c3f3435.tar.xz |
GDK_DISPLAY() is deprecated
-rw-r--r-- | mate-session/gs-idle-monitor.c | 38 | ||||
-rw-r--r-- | mate-session/gsm-inhibit-dialog.c | 16 |
2 files changed, 27 insertions, 27 deletions
diff --git a/mate-session/gs-idle-monitor.c b/mate-session/gs-idle-monitor.c index 05dbb02..aa200c5 100644 --- a/mate-session/gs-idle-monitor.c +++ b/mate-session/gs-idle-monitor.c @@ -141,16 +141,16 @@ send_fake_event (GSIdleMonitor *monitor) g_debug ("GSIdleMonitor: sending fake key"); - XLockDisplay (GDK_DISPLAY()); - XTestFakeKeyEvent (GDK_DISPLAY(), + XLockDisplay (GDK_DISPLAY_XDISPLAY(gdk_display_get_default())); + XTestFakeKeyEvent (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), *monitor->priv->keycode, True, CurrentTime); - XTestFakeKeyEvent (GDK_DISPLAY(), + XTestFakeKeyEvent (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), *monitor->priv->keycode, False, CurrentTime); - XUnlockDisplay (GDK_DISPLAY()); + XUnlockDisplay (GDK_DISPLAY_XDISPLAY(gdk_display_get_default())); /* Swap the keycode */ if (monitor->priv->keycode == &monitor->priv->keycode1) { @@ -249,7 +249,7 @@ init_xsync (GSIdleMonitor *monitor) int ncounters; XSyncSystemCounter *counters; - res = XSyncQueryExtension (GDK_DISPLAY (), + res = XSyncQueryExtension (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), &monitor->priv->sync_event_base, &sync_error_base); if (! res) { @@ -257,13 +257,13 @@ init_xsync (GSIdleMonitor *monitor) return FALSE; } - res = XSyncInitialize (GDK_DISPLAY (), &major, &minor); + res = XSyncInitialize (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), &major, &minor); if (! res) { g_warning ("GSIdleMonitor: Unable to initialize Sync extension"); return FALSE; } - counters = XSyncListSystemCounters (GDK_DISPLAY (), &ncounters); + counters = XSyncListSystemCounters (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), &ncounters); for (i = 0; i < ncounters; i++) { if (counters[i].name != NULL && strcmp (counters[i].name, "IDLETIME") == 0) { @@ -289,23 +289,23 @@ _init_xtest (GSIdleMonitor *monitor) #ifdef HAVE_XTEST int a, b, c, d; - XLockDisplay (GDK_DISPLAY()); - monitor->priv->have_xtest = (XTestQueryExtension (GDK_DISPLAY(), &a, &b, &c, &d) == True); + XLockDisplay (GDK_DISPLAY_XDISPLAY(gdk_display_get_default())); + monitor->priv->have_xtest = (XTestQueryExtension (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), &a, &b, &c, &d) == True); if (monitor->priv->have_xtest) { - monitor->priv->keycode1 = XKeysymToKeycode (GDK_DISPLAY(), XK_Alt_L); + monitor->priv->keycode1 = XKeysymToKeycode (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), XK_Alt_L); if (monitor->priv->keycode1 == 0) { g_warning ("keycode1 not existant"); } - monitor->priv->keycode2 = XKeysymToKeycode (GDK_DISPLAY(), XK_Alt_R); + monitor->priv->keycode2 = XKeysymToKeycode (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), XK_Alt_R); if (monitor->priv->keycode2 == 0) { - monitor->priv->keycode2 = XKeysymToKeycode (GDK_DISPLAY(), XK_Alt_L); + monitor->priv->keycode2 = XKeysymToKeycode (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), XK_Alt_L); if (monitor->priv->keycode2 == 0) { g_warning ("keycode2 not existant"); } } monitor->priv->keycode = &monitor->priv->keycode1; } - XUnlockDisplay (GDK_DISPLAY()); + XUnlockDisplay (GDK_DISPLAY_XDISPLAY(gdk_display_get_default())); #endif /* HAVE_XTEST */ } @@ -379,10 +379,10 @@ idle_monitor_watch_free (GSIdleMonitorWatch *watch) return; } if (watch->xalarm_positive != None) { - XSyncDestroyAlarm (GDK_DISPLAY (), watch->xalarm_positive); + XSyncDestroyAlarm (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), watch->xalarm_positive); } if (watch->xalarm_negative != None) { - XSyncDestroyAlarm (GDK_DISPLAY (), watch->xalarm_negative); + XSyncDestroyAlarm (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), watch->xalarm_negative); } g_slice_free (GSIdleMonitorWatch, watch); } @@ -452,22 +452,22 @@ _xsync_alarm_set (GSIdleMonitor *monitor, if (watch->xalarm_positive != None) { g_debug ("GSIdleMonitor: updating alarm for positive transition wait=%lld", _xsyncvalue_to_int64 (attr.trigger.wait_value)); - XSyncChangeAlarm (GDK_DISPLAY (), watch->xalarm_positive, flags, &attr); + XSyncChangeAlarm (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), watch->xalarm_positive, flags, &attr); } else { g_debug ("GSIdleMonitor: creating new alarm for positive transition wait=%lld", _xsyncvalue_to_int64 (attr.trigger.wait_value)); - watch->xalarm_positive = XSyncCreateAlarm (GDK_DISPLAY (), flags, &attr); + watch->xalarm_positive = XSyncCreateAlarm (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), flags, &attr); } attr.trigger.test_type = XSyncNegativeTransition; if (watch->xalarm_negative != None) { g_debug ("GSIdleMonitor: updating alarm for negative transition wait=%lld", _xsyncvalue_to_int64 (attr.trigger.wait_value)); - XSyncChangeAlarm (GDK_DISPLAY (), watch->xalarm_negative, flags, &attr); + XSyncChangeAlarm (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), watch->xalarm_negative, flags, &attr); } else { g_debug ("GSIdleMonitor: creating new alarm for negative transition wait=%lld", _xsyncvalue_to_int64 (attr.trigger.wait_value)); - watch->xalarm_negative = XSyncCreateAlarm (GDK_DISPLAY (), flags, &attr); + watch->xalarm_negative = XSyncCreateAlarm (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), flags, &attr); } return TRUE; diff --git a/mate-session/gsm-inhibit-dialog.c b/mate-session/gsm-inhibit-dialog.c index d5b4d57..53b0d08 100644 --- a/mate-session/gsm-inhibit-dialog.c +++ b/mate-session/gsm-inhibit-dialog.c @@ -408,9 +408,9 @@ get_pixmap_for_window (Window window) int width; int height; - XGetWindowAttributes (GDK_DISPLAY (), window, &attr); + XGetWindowAttributes (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), window, &attr); - format = XRenderFindVisualFormat (GDK_DISPLAY (), attr.visual); + format = XRenderFindVisualFormat (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), attr.visual); has_alpha = (format->type == PictTypeDirect && format->direct.alphaMask); x = attr.x; y = attr.y; @@ -419,15 +419,15 @@ get_pixmap_for_window (Window window) pa.subwindow_mode = IncludeInferiors; /* Don't clip child widgets */ - src_picture = XRenderCreatePicture (GDK_DISPLAY (), window, format, CPSubwindowMode, &pa); + src_picture = XRenderCreatePicture (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), window, format, CPSubwindowMode, &pa); - pixmap = XCreatePixmap (GDK_DISPLAY (), + pixmap = XCreatePixmap (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), window, width, height, attr.depth); - dst_picture = XRenderCreatePicture (GDK_DISPLAY (), pixmap, format, 0, 0); - XRenderComposite (GDK_DISPLAY (), + dst_picture = XRenderCreatePicture (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), pixmap, format, 0, 0); + XRenderComposite (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), has_alpha ? PictOpOver : PictOpSrc, src_picture, None, @@ -465,7 +465,7 @@ get_pixbuf_for_window (guint xid, if (xpixmap != None) { gdk_error_trap_push (); - XFreePixmap (GDK_DISPLAY (), xpixmap); + XFreePixmap (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), xpixmap); gdk_display_sync (gdk_display_get_default ()); gdk_error_trap_pop (); } @@ -994,7 +994,7 @@ gsm_inhibit_dialog_constructor (GType type, #ifdef HAVE_XRENDER gdk_error_trap_push (); - if (XRenderQueryExtension (GDK_DISPLAY (), &dialog->priv->xrender_event_base, &dialog->priv->xrender_error_base)) { + if (XRenderQueryExtension (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), &dialog->priv->xrender_event_base, &dialog->priv->xrender_error_base)) { g_debug ("GsmInhibitDialog: Initialized XRender extension"); dialog->priv->have_xrender = TRUE; } else { |