Don't access GdkDisplay fields directly

Use accessors instead.
This commit is contained in:
Javier Jardón 2010-12-10 23:14:43 -05:00 committed by Matthias Clasen
parent ea96e5e16f
commit dfe6ba932c
5 changed files with 17 additions and 17 deletions

View File

@ -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),

View File

@ -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 ();

View File

@ -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);

View File

@ -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),

View File

@ -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);