[gnome-control-center] bgo#629299 - Use gdk_display_get_default instead of GDK_DISPLAY



commit cd8a0ecbe2cd6c46aa28224f5a14c3cd2c8a12a3
Author: Kalev Lember <kalev smartlink ee>
Date:   Fri Sep 10 19:03:09 2010 +0300

    bgo#629299 - Use gdk_display_get_default instead of GDK_DISPLAY
    
    GDK_DISPLAY() was deprecated in GTK+ 2.22 and removed in GTK+ 3.

 panels/keybindings/eggcellrendererkeys.c |    2 +-
 typing-break/drw-monitor.c               |    7 +++++--
 typing-break/drw-selection.c             |    4 ++--
 typing-break/main.c                      |    2 +-
 4 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/panels/keybindings/eggcellrendererkeys.c b/panels/keybindings/eggcellrendererkeys.c
index 776a539..4476bcb 100644
--- a/panels/keybindings/eggcellrendererkeys.c
+++ b/panels/keybindings/eggcellrendererkeys.c
@@ -326,7 +326,7 @@ is_modifier (guint keycode)
   XModifierKeymap *mod_keymap;
   gboolean retval = FALSE;
 
-  mod_keymap = XGetModifierMapping (gdk_display);
+  mod_keymap = XGetModifierMapping (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()));
 
   map_size = 8 * mod_keymap->max_keypermod;
   i = 0;
diff --git a/typing-break/drw-monitor.c b/typing-break/drw-monitor.c
index 5f0270c..e9dc57b 100644
--- a/typing-break/drw-monitor.c
+++ b/typing-break/drw-monitor.c
@@ -146,7 +146,9 @@ drw_monitor_timeout (DrwMonitor *monitor)
 
 	priv = monitor->priv;
 	
-	if (XScreenSaverQueryInfo (GDK_DISPLAY (), DefaultRootWindow (GDK_DISPLAY ()), priv->ss_info) != 0) {
+	if (XScreenSaverQueryInfo (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
+	                           DefaultRootWindow (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ())),
+	                           priv->ss_info) != 0) {
 		if (priv->ss_info->idle < priv->last_idle) {
  			now = time (NULL);
  
@@ -172,7 +174,8 @@ drw_monitor_setup (DrwMonitor *monitor)
 
 	priv = monitor->priv;
 
-	if (!XScreenSaverQueryExtension (GDK_DISPLAY (), &event_base, &error_base)) {
+	if (!XScreenSaverQueryExtension (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
+	                                 &event_base, &error_base)) {
 		return FALSE;
 	}
 
diff --git a/typing-break/drw-selection.c b/typing-break/drw-selection.c
index 99b0980..9607df9 100644
--- a/typing-break/drw-selection.c
+++ b/typing-break/drw-selection.c
@@ -70,7 +70,7 @@ drw_selection_clear (GtkWidget         *widget,
 static gboolean
 drw_selection_find_existing (DrwSelection *drw_selection)
 {
-	Display *xdisplay = GDK_DISPLAY ();
+	Display *xdisplay = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
 	Window old;
 
 	gdk_error_trap_push ();
@@ -120,7 +120,7 @@ drw_selection_claim (DrwSelection *drw_selection)
 static void
 drw_selection_negotiate (DrwSelection *drw_selection)
 {
-	Display *xdisplay = GDK_DISPLAY ();
+	Display *xdisplay = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
 	gboolean found = FALSE;
 
 	/* We don't need both the XGrabServer() and the loop here;
diff --git a/typing-break/main.c b/typing-break/main.c
index 5ecd322..ef0a339 100644
--- a/typing-break/main.c
+++ b/typing-break/main.c
@@ -35,7 +35,7 @@ gboolean debug = FALSE;
 static gboolean
 have_tray (void)
 {
-	Screen *xscreen = DefaultScreenOfDisplay (gdk_display);
+	Screen *xscreen = DefaultScreenOfDisplay (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()));
 	Atom    selection_atom;
 	char   *selection_atom_name;
 	



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]