[gtk+/gdk-backend: 37/91] Don't access GdkDisplay fields directly
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gdk-backend: 37/91] Don't access GdkDisplay fields directly
- Date: Sat, 18 Dec 2010 01:08:55 +0000 (UTC)
commit e61dfa6f87c5b89d04d3d346a6b09aaa8765cc97
Author: Javier Jardón <jjardon gnome org>
Date: Fri Dec 10 23:14:43 2010 -0500
Don't access GdkDisplay fields directly
Use accessors instead.
gdk/x11/gdkcursor-x11.c | 14 +++++++-------
gdk/x11/gdkmain-x11.c | 4 ++--
gdk/x11/gdkproperty-x11.c | 4 ++--
gdk/x11/gdkselection-x11.c | 10 +++++-----
gdk/x11/gdkwindow-x11.c | 2 +-
5 files changed, 17 insertions(+), 17 deletions(-)
---
diff --git a/gdk/x11/gdkcursor-x11.c b/gdk/x11/gdkcursor-x11.c
index 6169cc1..5cfc445 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 056c90b..57aedf5 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 00132b2..60774ed 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 00390aa..74d17c4 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 ef11707..527da43 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]