summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier Jardón <jjardon@gnome.org>2010-12-10 23:14:43 -0500
committerMatthias Clasen <mclasen@redhat.com>2010-12-21 12:06:58 -0500
commitdfe6ba932ca798c53121f90b7d696b5d2231a179 (patch)
treed6285f17cb56a7a3bb8f963a66a3640a7db9ed1b
parentea96e5e16f964c71f2ac3fcf5237542e4776221c (diff)
downloadgtk+-dfe6ba932ca798c53121f90b7d696b5d2231a179.tar.gz
Don't access GdkDisplay fields directly
Use accessors instead.
-rw-r--r--gdk/x11/gdkcursor-x11.c14
-rw-r--r--gdk/x11/gdkmain-x11.c4
-rw-r--r--gdk/x11/gdkproperty-x11.c4
-rw-r--r--gdk/x11/gdkselection-x11.c10
-rw-r--r--gdk/x11/gdkwindow-x11.c2
5 files changed, 17 insertions, 17 deletions
diff --git a/gdk/x11/gdkcursor-x11.c b/gdk/x11/gdkcursor-x11.c
index 6169cc1d89..5cfc445b49 100644
--- a/gdk/x11/gdkcursor-x11.c
+++ b/gdk/x11/gdkcursor-x11.c
@@ -177,8 +177,8 @@ get_blank_cursor (GdkDisplay *display)
color.pixel = 0;
color.red = color.blue = color.green = 0;
-
- if (display->closed)
+
+ if (gdk_display_is_closed (display))
cursor = None;
else
cursor = XCreatePixmapCursor (GDK_DISPLAY_XDISPLAY (display),
@@ -267,7 +267,7 @@ gdk_cursor_new_for_display (GdkDisplay *display,
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
- if (display->closed)
+ if (gdk_display_is_closed (display))
{
xcursor = None;
}
@@ -317,7 +317,7 @@ _gdk_cursor_destroy (GdkCursor *cursor)
g_return_if_fail (cursor->ref_count == 0);
private = (GdkCursorPrivate *) cursor;
- if (!private->display->closed && private->xcursor)
+ if (private->xcursor && !gdk_display_is_closed (private->display))
XFreeCursor (GDK_DISPLAY_XDISPLAY (private->display), private->xcursor);
g_free (private->name);
@@ -696,7 +696,7 @@ gdk_cursor_new_from_pixbuf (GdkDisplay *display,
g_return_val_if_fail (0 <= x && x < gdk_pixbuf_get_width (pixbuf), NULL);
g_return_val_if_fail (0 <= y && y < gdk_pixbuf_get_height (pixbuf), NULL);
- if (display->closed)
+ if (gdk_display_is_closed (display))
xcursor = None;
else
{
@@ -742,7 +742,7 @@ gdk_cursor_new_from_name (GdkDisplay *display,
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
- if (display->closed)
+ if (gdk_display_is_closed (display))
xcursor = None;
else
{
@@ -862,7 +862,7 @@ gdk_cursor_new_from_pixmap (GdkDisplay *display,
xbg.blue = bg->blue;
xbg.green = bg->green;
- if (display->closed)
+ if (gdk_display_is_closed (display->closed))
xcursor = None;
else
xcursor = XCreatePixmapCursor (GDK_DISPLAY_XDISPLAY (display),
diff --git a/gdk/x11/gdkmain-x11.c b/gdk/x11/gdkmain-x11.c
index 056c90b629..57aedf542c 100644
--- a/gdk/x11/gdkmain-x11.c
+++ b/gdk/x11/gdkmain-x11.c
@@ -209,7 +209,7 @@ _gdk_windowing_display_set_sm_client_id (GdkDisplay *display,
{
GdkDisplayX11 *display_x11 = GDK_DISPLAY_X11 (display);
- if (display->closed)
+ if (gdk_display_is_closed (display))
return;
if (sm_client_id && strcmp (sm_client_id, ""))
@@ -507,7 +507,7 @@ _gdk_send_xevent (GdkDisplay *display,
{
gboolean result;
- if (display->closed)
+ if (gdk_display_is_closed (display))
return FALSE;
gdk_error_trap_push ();
diff --git a/gdk/x11/gdkproperty-x11.c b/gdk/x11/gdkproperty-x11.c
index 00132b29e1..60774ed1ef 100644
--- a/gdk/x11/gdkproperty-x11.c
+++ b/gdk/x11/gdkproperty-x11.c
@@ -231,7 +231,7 @@ gdk_x11_atom_to_xatom_for_display (GdkDisplay *display,
if (atom == GDK_NONE)
return None;
- if (display->closed)
+ if (gdk_display_is_closed (display))
return None;
xatom = lookup_cached_xatom (display, atom);
@@ -337,7 +337,7 @@ gdk_x11_xatom_to_atom_for_display (GdkDisplay *display,
if (xatom == None)
return GDK_NONE;
- if (display->closed)
+ if (gdk_display_is_closed (display))
return GDK_NONE;
display_x11 = GDK_DISPLAY_X11 (display);
diff --git a/gdk/x11/gdkselection-x11.c b/gdk/x11/gdkselection-x11.c
index 00390aa34f..74d17c4f4d 100644
--- a/gdk/x11/gdkselection-x11.c
+++ b/gdk/x11/gdkselection-x11.c
@@ -138,7 +138,7 @@ gdk_selection_owner_set_for_display (GdkDisplay *display,
g_return_val_if_fail (GDK_IS_DISPLAY (display), FALSE);
g_return_val_if_fail (selection != GDK_NONE, FALSE);
- if (display->closed)
+ if (gdk_display_is_closed (display))
return FALSE;
if (owner)
@@ -211,8 +211,8 @@ gdk_selection_owner_get_for_display (GdkDisplay *display,
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
g_return_val_if_fail (selection != GDK_NONE, NULL);
-
- if (display->closed)
+
+ if (gdk_display_is_closed (display))
return NULL;
xwindow = XGetSelectionOwner (GDK_DISPLAY_XDISPLAY (display),
@@ -458,7 +458,7 @@ gdk_text_property_to_text_list_for_display (GdkDisplay *display,
if (list)
*list = NULL;
- if (display->closed)
+ if (gdk_display_is_closed (display))
return 0;
property.value = (guchar *)text;
@@ -709,7 +709,7 @@ gdk_string_to_compound_text_for_display (GdkDisplay *display,
g_return_val_if_fail (GDK_IS_DISPLAY (display), 0);
- if (display->closed)
+ if (gdk_display_is_closed (display))
res = XLocaleNotSupported;
else
res = XmbTextListToTextProperty (GDK_DISPLAY_XDISPLAY (display),
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index ef1170773f..527da43f3c 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -2791,7 +2791,7 @@ _gdk_windowing_get_device_state (GdkDisplay *display,
{
GdkScreen *default_screen;
- if (display->closed)
+ if (gdk_display_is_closed (display))
return;
default_screen = gdk_display_get_default_screen (display);