Commit e5ae081e authored by Owen Taylor's avatar Owen Taylor Committed by Owen Taylor
Browse files

Start implementing display/screen closing scheme; keep a flag for whether

Thu Aug  1 11:26:03 2002  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkdisplay.[ch] gdk/gdkscreen.[ch] gdkinternals.h:
	Start implementing display/screen closing scheme; keep a
	flag for whether displays and screens are closed,
	call g_object_run_dispose(). Remove public gdk_screen_close().

	* gdk/x11/gdkdisplay-x11.c gdk/x11/gdkscreen-x11.c: Add
	dispose() methods; move appropriate parts of the finalize
	there.

	* gdk/x11/gdkcolor-x11.c gdk/x11/gdkimage-x11.c
	gdk/x11/gdkmain-x11.c gdk/x11/gdkpango-x11.c
	gdk/x11/gdkpixmap-x11.c gdk/x11/gdkproperty-x11.c
	gdk/x11/gdkselection-x11.c gdk/x11/gdkwindow-x11.c:
	Start of making everything correctly ignore operations
	when a display has been closed.

	* gdk/x11/gdkwindow-x11.c (gdk_window_get_decorations):
	Handle decorations == NULL.

	* gdk/x11/gdkcolor-x11.c (gdk_colormap_remove):
	Remove unnecessary hash table creation.

	* gdk/x11/gdkinput.c gdk/x11/gdkinput-x11.c gdk/win32/gdkinput.c
	Fix up gdk_device_get_history - handle events, n_events == NULL,
	etc.

	* gdk/x11/gdkproperty-x11.c (gdk_property_get):
	Handle failure better.

	* gdk/x11/gdkselection-x11.c (gdk_selection_property_get):
	Handle failure better, handle data == NULL, move docs
	here, remove an excess round trip by asking for
	all selection data at once.

	* gdk/gdkselection.c gdk/win32/{x11,win32}/gdkselection-{x11,win32}.c
	  gdk/{x11,win32}/gdkmain-{x11,win32}.c	gdk/gdkdisplay.c: Move
	gdk_text_property_to_text_list(), gdk_string_to_compound_text(),
	gdk_display_set_sm_client_id() to display-independent part of GDK.

	* gdk/Makefile.am (gdk_c_sources): Sort gdkdisplay/screen.[ch]
	into the right place.
parent d202b55b
Thu Aug 1 11:26:03 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdisplay.[ch] gdk/gdkscreen.[ch] gdkinternals.h:
Start implementing display/screen closing scheme; keep a
flag for whether displays and screens are closed,
call g_object_run_dispose(). Remove public gdk_screen_close().
* gdk/x11/gdkdisplay-x11.c gdk/x11/gdkscreen-x11.c: Add
dispose() methods; move appropriate parts of the finalize
there.
* gdk/x11/gdkcolor-x11.c gdk/x11/gdkimage-x11.c
gdk/x11/gdkmain-x11.c gdk/x11/gdkpango-x11.c
gdk/x11/gdkpixmap-x11.c gdk/x11/gdkproperty-x11.c
gdk/x11/gdkselection-x11.c gdk/x11/gdkwindow-x11.c:
Start of making everything correctly ignore operations
when a display has been closed.
* gdk/x11/gdkwindow-x11.c (gdk_window_get_decorations):
Handle decorations == NULL.
* gdk/x11/gdkcolor-x11.c (gdk_colormap_remove):
Remove unnecessary hash table creation.
* gdk/x11/gdkinput.c gdk/x11/gdkinput-x11.c gdk/win32/gdkinput.c
Fix up gdk_device_get_history - handle events, n_events == NULL,
etc.
* gdk/x11/gdkproperty-x11.c (gdk_property_get):
Handle failure better.
* gdk/x11/gdkselection-x11.c (gdk_selection_property_get):
Handle failure better, handle data == NULL, move docs
here, remove an excess round trip by asking for
all selection data at once.
* gdk/gdkselection.c gdk/win32/{x11,win32}/gdkselection-{x11,win32}.c
gdk/{x11,win32}/gdkmain-{x11,win32}.c gdk/gdkdisplay.c: Move
gdk_text_property_to_text_list(), gdk_string_to_compound_text(),
gdk_display_set_sm_client_id() to display-independent part of GDK.
* gdk/Makefile.am (gdk_c_sources): Sort gdkdisplay/screen.[ch]
into the right place.
2002-07-31 jacob berkman <jacob@ximian.com> 2002-07-31 jacob berkman <jacob@ximian.com>
* gtk/queryimmodules.c (print_escaped): escape_string() only takes * gtk/queryimmodules.c (print_escaped): escape_string() only takes
......
Thu Aug 1 11:26:03 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdisplay.[ch] gdk/gdkscreen.[ch] gdkinternals.h:
Start implementing display/screen closing scheme; keep a
flag for whether displays and screens are closed,
call g_object_run_dispose(). Remove public gdk_screen_close().
* gdk/x11/gdkdisplay-x11.c gdk/x11/gdkscreen-x11.c: Add
dispose() methods; move appropriate parts of the finalize
there.
* gdk/x11/gdkcolor-x11.c gdk/x11/gdkimage-x11.c
gdk/x11/gdkmain-x11.c gdk/x11/gdkpango-x11.c
gdk/x11/gdkpixmap-x11.c gdk/x11/gdkproperty-x11.c
gdk/x11/gdkselection-x11.c gdk/x11/gdkwindow-x11.c:
Start of making everything correctly ignore operations
when a display has been closed.
* gdk/x11/gdkwindow-x11.c (gdk_window_get_decorations):
Handle decorations == NULL.
* gdk/x11/gdkcolor-x11.c (gdk_colormap_remove):
Remove unnecessary hash table creation.
* gdk/x11/gdkinput.c gdk/x11/gdkinput-x11.c gdk/win32/gdkinput.c
Fix up gdk_device_get_history - handle events, n_events == NULL,
etc.
* gdk/x11/gdkproperty-x11.c (gdk_property_get):
Handle failure better.
* gdk/x11/gdkselection-x11.c (gdk_selection_property_get):
Handle failure better, handle data == NULL, move docs
here, remove an excess round trip by asking for
all selection data at once.
* gdk/gdkselection.c gdk/win32/{x11,win32}/gdkselection-{x11,win32}.c
gdk/{x11,win32}/gdkmain-{x11,win32}.c gdk/gdkdisplay.c: Move
gdk_text_property_to_text_list(), gdk_string_to_compound_text(),
gdk_display_set_sm_client_id() to display-independent part of GDK.
* gdk/Makefile.am (gdk_c_sources): Sort gdkdisplay/screen.[ch]
into the right place.
2002-07-31 jacob berkman <jacob@ximian.com> 2002-07-31 jacob berkman <jacob@ximian.com>
* gtk/queryimmodules.c (print_escaped): escape_string() only takes * gtk/queryimmodules.c (print_escaped): escape_string() only takes
......
Thu Aug 1 11:26:03 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdisplay.[ch] gdk/gdkscreen.[ch] gdkinternals.h:
Start implementing display/screen closing scheme; keep a
flag for whether displays and screens are closed,
call g_object_run_dispose(). Remove public gdk_screen_close().
* gdk/x11/gdkdisplay-x11.c gdk/x11/gdkscreen-x11.c: Add
dispose() methods; move appropriate parts of the finalize
there.
* gdk/x11/gdkcolor-x11.c gdk/x11/gdkimage-x11.c
gdk/x11/gdkmain-x11.c gdk/x11/gdkpango-x11.c
gdk/x11/gdkpixmap-x11.c gdk/x11/gdkproperty-x11.c
gdk/x11/gdkselection-x11.c gdk/x11/gdkwindow-x11.c:
Start of making everything correctly ignore operations
when a display has been closed.
* gdk/x11/gdkwindow-x11.c (gdk_window_get_decorations):
Handle decorations == NULL.
* gdk/x11/gdkcolor-x11.c (gdk_colormap_remove):
Remove unnecessary hash table creation.
* gdk/x11/gdkinput.c gdk/x11/gdkinput-x11.c gdk/win32/gdkinput.c
Fix up gdk_device_get_history - handle events, n_events == NULL,
etc.
* gdk/x11/gdkproperty-x11.c (gdk_property_get):
Handle failure better.
* gdk/x11/gdkselection-x11.c (gdk_selection_property_get):
Handle failure better, handle data == NULL, move docs
here, remove an excess round trip by asking for
all selection data at once.
* gdk/gdkselection.c gdk/win32/{x11,win32}/gdkselection-{x11,win32}.c
gdk/{x11,win32}/gdkmain-{x11,win32}.c gdk/gdkdisplay.c: Move
gdk_text_property_to_text_list(), gdk_string_to_compound_text(),
gdk_display_set_sm_client_id() to display-independent part of GDK.
* gdk/Makefile.am (gdk_c_sources): Sort gdkdisplay/screen.[ch]
into the right place.
2002-07-31 jacob berkman <jacob@ximian.com> 2002-07-31 jacob berkman <jacob@ximian.com>
* gtk/queryimmodules.c (print_escaped): escape_string() only takes * gtk/queryimmodules.c (print_escaped): escape_string() only takes
......
Thu Aug 1 11:26:03 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdisplay.[ch] gdk/gdkscreen.[ch] gdkinternals.h:
Start implementing display/screen closing scheme; keep a
flag for whether displays and screens are closed,
call g_object_run_dispose(). Remove public gdk_screen_close().
* gdk/x11/gdkdisplay-x11.c gdk/x11/gdkscreen-x11.c: Add
dispose() methods; move appropriate parts of the finalize
there.
* gdk/x11/gdkcolor-x11.c gdk/x11/gdkimage-x11.c
gdk/x11/gdkmain-x11.c gdk/x11/gdkpango-x11.c
gdk/x11/gdkpixmap-x11.c gdk/x11/gdkproperty-x11.c
gdk/x11/gdkselection-x11.c gdk/x11/gdkwindow-x11.c:
Start of making everything correctly ignore operations
when a display has been closed.
* gdk/x11/gdkwindow-x11.c (gdk_window_get_decorations):
Handle decorations == NULL.
* gdk/x11/gdkcolor-x11.c (gdk_colormap_remove):
Remove unnecessary hash table creation.
* gdk/x11/gdkinput.c gdk/x11/gdkinput-x11.c gdk/win32/gdkinput.c
Fix up gdk_device_get_history - handle events, n_events == NULL,
etc.
* gdk/x11/gdkproperty-x11.c (gdk_property_get):
Handle failure better.
* gdk/x11/gdkselection-x11.c (gdk_selection_property_get):
Handle failure better, handle data == NULL, move docs
here, remove an excess round trip by asking for
all selection data at once.
* gdk/gdkselection.c gdk/win32/{x11,win32}/gdkselection-{x11,win32}.c
gdk/{x11,win32}/gdkmain-{x11,win32}.c gdk/gdkdisplay.c: Move
gdk_text_property_to_text_list(), gdk_string_to_compound_text(),
gdk_display_set_sm_client_id() to display-independent part of GDK.
* gdk/Makefile.am (gdk_c_sources): Sort gdkdisplay/screen.[ch]
into the right place.
2002-07-31 jacob berkman <jacob@ximian.com> 2002-07-31 jacob berkman <jacob@ximian.com>
* gtk/queryimmodules.c (print_escaped): escape_string() only takes * gtk/queryimmodules.c (print_escaped): escape_string() only takes
......
Thu Aug 1 11:26:03 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdisplay.[ch] gdk/gdkscreen.[ch] gdkinternals.h:
Start implementing display/screen closing scheme; keep a
flag for whether displays and screens are closed,
call g_object_run_dispose(). Remove public gdk_screen_close().
* gdk/x11/gdkdisplay-x11.c gdk/x11/gdkscreen-x11.c: Add
dispose() methods; move appropriate parts of the finalize
there.
* gdk/x11/gdkcolor-x11.c gdk/x11/gdkimage-x11.c
gdk/x11/gdkmain-x11.c gdk/x11/gdkpango-x11.c
gdk/x11/gdkpixmap-x11.c gdk/x11/gdkproperty-x11.c
gdk/x11/gdkselection-x11.c gdk/x11/gdkwindow-x11.c:
Start of making everything correctly ignore operations
when a display has been closed.
* gdk/x11/gdkwindow-x11.c (gdk_window_get_decorations):
Handle decorations == NULL.
* gdk/x11/gdkcolor-x11.c (gdk_colormap_remove):
Remove unnecessary hash table creation.
* gdk/x11/gdkinput.c gdk/x11/gdkinput-x11.c gdk/win32/gdkinput.c
Fix up gdk_device_get_history - handle events, n_events == NULL,
etc.
* gdk/x11/gdkproperty-x11.c (gdk_property_get):
Handle failure better.
* gdk/x11/gdkselection-x11.c (gdk_selection_property_get):
Handle failure better, handle data == NULL, move docs
here, remove an excess round trip by asking for
all selection data at once.
* gdk/gdkselection.c gdk/win32/{x11,win32}/gdkselection-{x11,win32}.c
gdk/{x11,win32}/gdkmain-{x11,win32}.c gdk/gdkdisplay.c: Move
gdk_text_property_to_text_list(), gdk_string_to_compound_text(),
gdk_display_set_sm_client_id() to display-independent part of GDK.
* gdk/Makefile.am (gdk_c_sources): Sort gdkdisplay/screen.[ch]
into the right place.
2002-07-31 jacob berkman <jacob@ximian.com> 2002-07-31 jacob berkman <jacob@ximian.com>
* gtk/queryimmodules.c (print_escaped): escape_string() only takes * gtk/queryimmodules.c (print_escaped): escape_string() only takes
......
Thu Aug 1 11:26:03 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdisplay.[ch] gdk/gdkscreen.[ch] gdkinternals.h:
Start implementing display/screen closing scheme; keep a
flag for whether displays and screens are closed,
call g_object_run_dispose(). Remove public gdk_screen_close().
* gdk/x11/gdkdisplay-x11.c gdk/x11/gdkscreen-x11.c: Add
dispose() methods; move appropriate parts of the finalize
there.
* gdk/x11/gdkcolor-x11.c gdk/x11/gdkimage-x11.c
gdk/x11/gdkmain-x11.c gdk/x11/gdkpango-x11.c
gdk/x11/gdkpixmap-x11.c gdk/x11/gdkproperty-x11.c
gdk/x11/gdkselection-x11.c gdk/x11/gdkwindow-x11.c:
Start of making everything correctly ignore operations
when a display has been closed.
* gdk/x11/gdkwindow-x11.c (gdk_window_get_decorations):
Handle decorations == NULL.
* gdk/x11/gdkcolor-x11.c (gdk_colormap_remove):
Remove unnecessary hash table creation.
* gdk/x11/gdkinput.c gdk/x11/gdkinput-x11.c gdk/win32/gdkinput.c
Fix up gdk_device_get_history - handle events, n_events == NULL,
etc.
* gdk/x11/gdkproperty-x11.c (gdk_property_get):
Handle failure better.
* gdk/x11/gdkselection-x11.c (gdk_selection_property_get):
Handle failure better, handle data == NULL, move docs
here, remove an excess round trip by asking for
all selection data at once.
* gdk/gdkselection.c gdk/win32/{x11,win32}/gdkselection-{x11,win32}.c
gdk/{x11,win32}/gdkmain-{x11,win32}.c gdk/gdkdisplay.c: Move
gdk_text_property_to_text_list(), gdk_string_to_compound_text(),
gdk_display_set_sm_client_id() to display-independent part of GDK.
* gdk/Makefile.am (gdk_c_sources): Sort gdkdisplay/screen.[ch]
into the right place.
2002-07-31 jacob berkman <jacob@ximian.com> 2002-07-31 jacob berkman <jacob@ximian.com>
* gtk/queryimmodules.c (print_escaped): escape_string() only takes * gtk/queryimmodules.c (print_escaped): escape_string() only takes
......
...@@ -265,21 +265,13 @@ form. ...@@ -265,21 +265,13 @@ form.
<!-- ##### FUNCTION gdk_selection_property_get ##### --> <!-- ##### FUNCTION gdk_selection_property_get ##### -->
<para> <para>
Retrieves selection data that was stored by the selection
data in response to a call to gdk_selection_convert().
</para> </para>
@requestor: the window on which the data is stored @requestor:
@data: location to store a pointer to the retrieved data. @data:
If the retrieval failed, %NULL we be stored here, otherwise, it @prop_type:
will be non-%NULL and the returned data should be freed with g_free() @prop_format:
when you are finished using it. The length of the @Returns:
allocated memory is one more than the the length
of the returned data, and the final byte will always
be zero, to ensure nul-termination of strings.
@prop_type: location to store the type of the property.
@prop_format: location to store the format of the property.
@Returns: the length of the retrieved data.
<!-- ##### FUNCTION gdk_selection_send_notify ##### --> <!-- ##### FUNCTION gdk_selection_send_notify ##### -->
......
...@@ -91,6 +91,7 @@ gdk_public_h_sources = @STRIP_BEGIN@ \ ...@@ -91,6 +91,7 @@ gdk_public_h_sources = @STRIP_BEGIN@ \
gdk.h \ gdk.h \
gdkcolor.h \ gdkcolor.h \
gdkcursor.h \ gdkcursor.h \
gdkdisplay.h \
gdkdnd.h \ gdkdnd.h \
gdkdrawable.h \ gdkdrawable.h \
gdkevents.h \ gdkevents.h \
...@@ -108,12 +109,11 @@ gdk_public_h_sources = @STRIP_BEGIN@ \ ...@@ -108,12 +109,11 @@ gdk_public_h_sources = @STRIP_BEGIN@ \
gdkproperty.h \ gdkproperty.h \
gdkregion.h \ gdkregion.h \
gdkrgb.h \ gdkrgb.h \
gdkscreen.h \
gdkselection.h \ gdkselection.h \
gdktypes.h \ gdktypes.h \
gdkvisual.h \ gdkvisual.h \
gdkwindow.h \ gdkwindow.h \
gdkdisplay.h \
gdkscreen.h \
@STRIP_END@ @STRIP_END@
gdk_headers = @STRIP_BEGIN@ \ gdk_headers = @STRIP_BEGIN@ \
...@@ -126,6 +126,7 @@ gdk_c_sources = @STRIP_BEGIN@ \ ...@@ -126,6 +126,7 @@ gdk_c_sources = @STRIP_BEGIN@ \
gdk.c \ gdk.c \
gdkcolor.c \ gdkcolor.c \
gdkcursor.c \ gdkcursor.c \
gdkdisplay.c \
gdkdraw.c \ gdkdraw.c \
gdkevents.c \ gdkevents.c \
gdkfont.c \ gdkfont.c \
...@@ -147,11 +148,10 @@ gdk_c_sources = @STRIP_BEGIN@ \ ...@@ -147,11 +148,10 @@ gdk_c_sources = @STRIP_BEGIN@ \
gdkrectangle.c \ gdkrectangle.c \
gdkregion-generic.c \ gdkregion-generic.c \
gdkregion-generic.h \ gdkregion-generic.h \
gdkscreen.c \
gdkselection.c \ gdkselection.c \
gdkvisual.c \ gdkvisual.c \
gdkwindow.c \ gdkwindow.c \
gdkdisplay.c \
gdkscreen.c \
@STRIP_END@ @STRIP_END@
# #
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
static void gdk_display_class_init (GdkDisplayClass *class); static void gdk_display_class_init (GdkDisplayClass *class);
static void gdk_display_init (GdkDisplay *display); static void gdk_display_init (GdkDisplay *display);
static void gdk_display_dispose (GObject *object);
static void gdk_display_finalize (GObject *object); static void gdk_display_finalize (GObject *object);
static GObjectClass *parent_class; static GObjectClass *parent_class;
...@@ -67,6 +68,7 @@ gdk_display_class_init (GdkDisplayClass *class) ...@@ -67,6 +68,7 @@ gdk_display_class_init (GdkDisplayClass *class)
parent_class = g_type_class_peek_parent (class); parent_class = g_type_class_peek_parent (class);
object_class->finalize = gdk_display_finalize; object_class->finalize = gdk_display_finalize;
object_class->dispose = gdk_display_dispose;
} }
static void static void
...@@ -81,6 +83,12 @@ gdk_display_init (GdkDisplay *display) ...@@ -81,6 +83,12 @@ gdk_display_init (GdkDisplay *display)
display->double_click_time = 250; display->double_click_time = 250;
} }
static void
gdk_display_dispose (GObject *object)
{
GdkDisplay *display = GDK_DISPLAY_OBJECT (object);
}
static void static void
gdk_display_finalize (GObject *object) gdk_display_finalize (GObject *object)
{ {
...@@ -99,13 +107,22 @@ gdk_display_finalize (GObject *object) ...@@ -99,13 +107,22 @@ gdk_display_finalize (GObject *object)
* gdk_display_close: * gdk_display_close:
* @display: a #GdkDisplay * @display: a #GdkDisplay
* *
* Closes and cleanup the resources used by the @display * Closes the connection windowing system for the given display,
* and cleans up associated resources.
*/ */
void void
gdk_display_close (GdkDisplay *display) gdk_display_close (GdkDisplay *display)
{ {
g_return_if_fail (GDK_IS_DISPLAY (display)); g_return_if_fail (GDK_IS_DISPLAY (display));
g_object_unref (G_OBJECT (display));
if (!display->closed)
{
display->closed = TRUE;
g_object_run_dispose (G_OBJECT (display));
g_object_unref (G_OBJECT (display));
}
} }
/** /**
...@@ -294,3 +311,24 @@ gdk_display_get_core_pointer (GdkDisplay *display) ...@@ -294,3 +311,24 @@ gdk_display_get_core_pointer (GdkDisplay *display)
{ {
return display->core_pointer; return display->core_pointer;
} }
/**
* gdk_set_sm_client_id:
* @sm_client_id: the client id assigned by the session manager when the
* connection was opened, or %NULL to remove the property.
*
* Sets the <literal>SM_CLIENT_ID</literal> property on the application's leader window so that
* the window manager can save the application's state using the X11R6 ICCCM
* session management protocol.
*
* See the X Session Management Library documentation for more information on
* session management and the Inter-Client Communication Conventions Manual
* (ICCCM) for information on the <literal>WM_CLIENT_LEADER</literal> property.
* (Both documents are part of the X Window System distribution.)
**/
void
gdk_set_sm_client_id (const gchar* sm_client_id)
{
gdk_display_set_sm_client_id (gdk_display_get_default (), sm_client_id);
}
...@@ -55,9 +55,10 @@ struct _GdkDisplay ...@@ -55,9 +55,10 @@ struct _GdkDisplay
GdkWindow *button_window[2]; /* The last 2 windows to receive button presses. */ GdkWindow *button_window[2]; /* The last 2 windows to receive button presses. */
guint button_number[2]; /* The last 2 buttons to be pressed. */ guint button_number[2]; /* The last 2 buttons to be pressed. */
guint double_click_time; /* Maximum time between clicks in msecs */
GdkDevice *core_pointer; /* Core pointer device */ GdkDevice *core_pointer; /* Core pointer device */
guint double_click_time; /* Maximum time between clicks in msecs */ guint closed : 1; /* Whether this display has been closed */
}; };
struct _GdkDisplayClass struct _GdkDisplayClass
......
...@@ -216,7 +216,8 @@ GdkImage *_gdk_drawable_copy_to_image (GdkDrawable *drawable, ...@@ -216,7 +216,8 @@ GdkImage *_gdk_drawable_copy_to_image (GdkDrawable *drawable,
void _gdk_window_destroy (GdkWindow *window, void _gdk_window_destroy (GdkWindow *window,
gboolean foreign_destroy); gboolean foreign_destroy);
void _gdk_window_clear_update_area (GdkWindow *window); void _gdk_window_clear_update_area (GdkWindow *window);
void _gdk_screen_close (GdkScreen *screen);
/***************************************** /*****************************************
* Interfaces provided by windowing code * * Interfaces provided by windowing code *
......
...@@ -54,20 +54,16 @@ gdk_screen_get_type (void) ...@@ -54,20 +54,16 @@ gdk_screen_get_type (void)
return object_type; return object_type;
} }
/**
* gdk_screen_close:
* @screen: a #GdkScreen
*
* Closes the @screen connection and cleanup its resources.
* Note that this function is called automatically by gdk_display_close().
**/
void void
gdk_screen_close (GdkScreen *screen) _gdk_screen_close (GdkScreen *screen)
{ {
g_return_if_fail (GDK_IS_SCREEN (screen)); g_return_if_fail (GDK_IS_SCREEN (screen));
g_object_run_dispose (G_OBJECT (screen)); if (!screen->closed)
{
screen->closed = TRUE;
g_object_run_dispose (G_OBJECT (screen));
}
} }
/** /**
......
...@@ -41,6 +41,8 @@ typedef struct _GdkScreenClass GdkScreenClass; ...@@ -41,6 +41,8 @@ typedef struct _GdkScreenClass GdkScreenClass;
struct _GdkScreen struct _GdkScreen
{ {
GObject parent_instance; GObject parent_instance;
guint closed : 1;
}; };
struct _GdkScreenClass struct _GdkScreenClass
...@@ -67,7 +69,6 @@ gint gdk_screen_get_width (GdkScreen *screen); ...@@ -67,7 +69,6 @@ gint gdk_screen_get_width (GdkScreen *screen);
gint gdk_screen_get_height (GdkScreen *screen); gint gdk_screen_get_height (GdkScreen *screen);
gint gdk_screen_get_width_mm (GdkScreen *screen); gint gdk_screen_get_width_mm (GdkScreen *screen);
gint gdk_screen_get_height_mm (GdkScreen *screen); gint gdk_screen_get_height_mm (GdkScreen *screen);
void gdk_screen_close (GdkScreen *screen);
GList * gdk_screen_list_visuals (GdkScreen *screen); GList * gdk_screen_list_visuals (GdkScreen *screen);
GList * gdk_screen_get_toplevel_windows (GdkScreen *screen); GList * gdk_screen_get_toplevel_windows (GdkScreen *screen);
......
...@@ -32,6 +32,17 @@ gdk_selection_send_notify (guint32 requestor, ...@@ -32,6 +32,17 @@ gdk_selection_send_notify (guint32 requestor,
target, property, time); target, property, time);
} }
gint
gdk_text_property_to_text_list (GdkAtom encoding,
gint format,
const guchar *text,
gint length,
gchar ***list)
{
return gdk_text_property_to_text_list_for_display (gdk_display_get_default (),
encoding, format, text, length, list);
}
/** /**
* gdk_text_property_to_utf8_list: * gdk_text_property_to_utf8_list:
* @encoding: an atom representing the encoding of the text * @encoding: an atom representing the encoding of the text
...@@ -58,6 +69,18 @@ gdk_text_property_to_utf8_list (GdkAtom encoding, ...@@ -58,6 +69,18 @@ gdk_text_property_to_utf8_list (GdkAtom encoding,
encoding, format, text, length, list); encoding, format, text, length, list);
} }
gint
gdk_string_to_compound_text (const gchar *str,
GdkAtom *encoding,
gint *format,
guchar **ctext,
gint *length)
{
return gdk_string_to_compound_text_for_display (gdk_display_get_default (),
str, encoding, format,