commit libgnomeui for openSUSE:Factory
Hello community, here is the log from the commit of package libgnomeui for openSUSE:Factory checked in at Thu Feb 26 12:21:17 CET 2009. -------- --- GNOME/libgnomeui/libgnomeui.changes 2009-01-22 00:05:40.000000000 +0100 +++ /mounts/work_src_done/STABLE/libgnomeui/libgnomeui.changes 2009-02-25 04:11:43.000000000 +0100 @@ -1,0 +2,7 @@ +Wed Feb 25 03:31:53 CET 2009 - vuntz@novell.com + +- Add libgnomeui-bnc468821-do-not-steal-sm-connection.patch: make + libgnomeui only handle SM connection it has initiated. This fixes + some compatibility issue with Qt. Fix bnc#468821. + +------------------------------------------------------------------- calling whatdependson for head-i586 New: ---- libgnomeui-bnc468821-do-not-steal-sm-connection.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libgnomeui.spec ++++++ --- /var/tmp/diff_new_pack.e25330/_old 2009-02-26 12:20:11.000000000 +0100 +++ /var/tmp/diff_new_pack.e25330/_new 2009-02-26 12:20:11.000000000 +0100 @@ -38,9 +38,11 @@ # Requires: gnome-icon-theme shared-mime-info Version: 2.24.0 -Release: 4 +Release: 5 Summary: The GNOME User Interface Library Source: %{name}-%{version}.tar.bz2 +# PATCH-FIX-UPSTREAM libgnomeui-bnc468821-do-not-steal-sm-connection.patch bnc468821 bgo573058 vuntz@novell.com -- Make libgnomeui only handle SM connection it has initiated +Patch0: libgnomeui-bnc468821-do-not-steal-sm-connection.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build Requires: %{name}-lang = %{version} @@ -104,6 +106,7 @@ %lang_package %prep %setup -q +%patch0 -p0 %build autoreconf -f -i @@ -149,6 +152,10 @@ %{_datadir}/gtk-doc/html/libgnomeui %changelog +* Wed Feb 25 2009 vuntz@novell.com +- Add libgnomeui-bnc468821-do-not-steal-sm-connection.patch: make + libgnomeui only handle SM connection it has initiated. This fixes + some compatibility issue with Qt. Fix bnc#468821. * Thu Jan 22 2009 crrodriguez@suse.de - remove "la" files [BNC#357465] * Wed Jan 07 2009 olh@suse.de ++++++ libgnomeui-bnc468821-do-not-steal-sm-connection.patch ++++++ Index: libgnomeui/gnome-ice.c =================================================================== --- libgnomeui/gnome-ice.c (révision 5703) +++ libgnomeui/gnome-ice.c (copie de travail) @@ -30,20 +30,23 @@ #ifdef HAVE_LIBSM #include <X11/ICE/ICElib.h> +#include <X11/SM/SMlib.h> #endif /* HAVE_LIBSM */ #include <unistd.h> #include <fcntl.h> #include <gtk/gtk.h> +#include "gnome-client.h" #include "gnome-ice.h" #ifdef HAVE_LIBSM -static void gnome_ice_io_error_handler (IceConn connection); +#define GNOME_ICE_CONN_INPUT_ID_KEY "gnome-ice-conn-input-id" -static void new_ice_connection (IceConn connection, IcePointer client_data, - Bool opening, IcePointer *watch_data); +static void gnome_ice_io_error_handler (IceConn connection); +G_GNUC_INTERNAL void _gnome_ice_start_connection_watcher (GnomeClient *client); +G_GNUC_INTERNAL void _gnome_ice_stop_connection_watcher (GnomeClient *client); /* This is called when data is available on an ICE connection. */ static gboolean @@ -77,37 +80,50 @@ process_ice_messages (GIOChannel *sour return TRUE; } -/* This is called when a new ICE connection is made. It arranges for - the ICE connection to be handled via the event loop. */ -static void -new_ice_connection (IceConn connection, IcePointer client_data, Bool opening, - IcePointer *watch_data) +/* This needs to be called when a new ICE connection is made. It arranges + for the ICE connection to be handled via the event loop. */ +G_GNUC_INTERNAL void +_gnome_ice_start_connection_watcher (GnomeClient *client) { + IceConn connection; + GIOChannel *channel; guint input_id; - if (opening) - { - GIOChannel *channel; - /* Make sure we don't pass on these file descriptors to any - exec'ed children */ - fcntl(IceConnectionNumber(connection),F_SETFD, - fcntl(IceConnectionNumber(connection),F_GETFD,0) | FD_CLOEXEC); - - channel = g_io_channel_unix_new (IceConnectionNumber (connection)); - input_id = g_io_add_watch (channel, - G_IO_IN | G_IO_HUP | G_IO_ERR | G_IO_PRI, - process_ice_messages, - connection); - g_io_channel_unref (channel); + g_return_if_fail (client != NULL); + g_return_if_fail (GNOME_IS_CLIENT (client)); + g_return_if_fail (GNOME_CLIENT_CONNECTED (client)); + + connection = SmcGetIceConnection (client->smc_conn); + + /* Make sure we don't pass on these file descriptors to any + exec'ed children */ + fcntl(IceConnectionNumber(connection),F_SETFD, + fcntl(IceConnectionNumber(connection),F_GETFD,0) | FD_CLOEXEC); + + channel = g_io_channel_unix_new (IceConnectionNumber (connection)); + input_id = g_io_add_watch (channel, + G_IO_IN | G_IO_HUP | G_IO_ERR | G_IO_PRI, + process_ice_messages, + connection); + g_io_channel_unref (channel); - *watch_data = (IcePointer) GUINT_TO_POINTER (input_id); - } - else - { - input_id = GPOINTER_TO_UINT ((gpointer) *watch_data); + g_object_set_data (G_OBJECT (client), + GNOME_ICE_CONN_INPUT_ID_KEY, GUINT_TO_POINTER (input_id)); +} - g_source_remove (input_id); - } +G_GNUC_INTERNAL void +_gnome_ice_stop_connection_watcher (GnomeClient *client) +{ + guint input_id; + + g_return_if_fail (client != NULL); + g_return_if_fail (GNOME_IS_CLIENT (client)); + + input_id = GPOINTER_TO_UINT (g_object_steal_data (G_OBJECT (client), + GNOME_ICE_CONN_INPUT_ID_KEY)); + + if (input_id > 0) + g_source_remove (input_id); } static IceIOErrorHandler gnome_ice_installed_handler; @@ -145,8 +161,6 @@ gnome_ice_init (void) if (gnome_ice_installed_handler == default_handler) gnome_ice_installed_handler = NULL; - IceAddConnectionWatch (new_ice_connection, NULL); - ice_init = TRUE; } #endif /* HAVE_LIBSM */ Index: libgnomeui/gnome-client.c =================================================================== --- libgnomeui/gnome-client.c (révision 5703) +++ libgnomeui/gnome-client.c (copie de travail) @@ -91,6 +91,8 @@ static const char *sm_screen G_GNUC_UNUS #endif G_GNUC_INTERNAL extern void _gnome_ui_gettext_init (gboolean bind_codeset); +G_GNUC_INTERNAL extern void _gnome_ice_start_connection_watcher (GnomeClient *client); +G_GNUC_INTERNAL extern void _gnome_ice_stop_connection_watcher (GnomeClient *client); /* The master client. */ static GnomeClient *master_client= NULL; @@ -1612,6 +1614,8 @@ gnome_client_connect (GnomeClient *clien { gint restarted= FALSE; + _gnome_ice_start_connection_watcher (client); + g_free (client->previous_id); client->previous_id= client->client_id; client->client_id= client_id; @@ -2494,6 +2498,8 @@ gnome_real_client_disconnect (GnomeClien { SmcCloseConnection ((SmcConn) client->smc_conn, 0, NULL); client->smc_conn = NULL; + + _gnome_ice_stop_connection_watcher (client); } client_set_state (client, GNOME_CLIENT_DISCONNECTED); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de