Disable theme thumbnailing on MacOS. Some CoreFoundation functionality can
2008-04-13 Jens Granseuer <jensgr@gmx.net> Disable theme thumbnailing on MacOS. Some CoreFoundation functionality can apparently no longer be used from forked processes (see bug #525058). Unfortunately, it is used by freetype/pango/cairo/gtk, and as such by our forked thumbnailer. This change means no thumbnails on MacOS, but I suppose that's better than crashing. Reworking the thumbnailer to work without forking is going to be a major effort. * theme-thumbnail.c: (theme_thumbnail_factory_init): only enable the asynchronous thumbnailer if not on MacOS svn path=/trunk/; revision=8649
This commit is contained in:
parent
3e446a1955
commit
debc4f4091
2 changed files with 24 additions and 3 deletions
|
@ -1,3 +1,15 @@
|
|||
2008-04-13 Jens Granseuer <jensgr@gmx.net>
|
||||
|
||||
Disable theme thumbnailing on MacOS. Some CoreFoundation functionality
|
||||
can apparently no longer be used from forked processes (see bug
|
||||
#525058). Unfortunately, it is used by freetype/pango/cairo/gtk, and
|
||||
as such by our forked thumbnailer. This change means no thumbnails on
|
||||
MacOS, but I suppose that's better than crashing. Reworking the
|
||||
thumbnailer to work without forking is going to be a major effort.
|
||||
|
||||
* theme-thumbnail.c: (theme_thumbnail_factory_init): only enable the
|
||||
asynchronous thumbnailer if not on MacOS
|
||||
|
||||
2008-04-12 Jens Granseuer <jensgr@gmx.net>
|
||||
|
||||
* gtkrc-utils.c: (gtkrc_get_details), (gtkrc_get_color_scheme):
|
||||
|
|
|
@ -20,8 +20,6 @@
|
|||
#include "gtkrc-utils.h"
|
||||
#include "capplet-util.h"
|
||||
|
||||
static gint child_pid;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
gboolean set;
|
||||
|
@ -1184,9 +1182,19 @@ generate_icon_theme_thumbnail_async (GnomeThemeIconInfo *theme_info,
|
|||
void
|
||||
theme_thumbnail_factory_init (int argc, char *argv[])
|
||||
{
|
||||
#ifndef __APPLE__
|
||||
gint child_pid;
|
||||
#endif
|
||||
|
||||
pipe (pipe_to_factory_fd);
|
||||
pipe (pipe_from_factory_fd);
|
||||
|
||||
/* Apple's CoreFoundation classes must not be used from forked
|
||||
* processes. Since freetype (and thus GTK) uses them, we simply
|
||||
* disable the thumbnailer on MacOS for now. That means no thumbs
|
||||
* until the thumbnailing process is rewritten, but at least we won't
|
||||
* make apps crash. */
|
||||
#ifndef __APPLE__
|
||||
child_pid = fork ();
|
||||
if (child_pid == 0)
|
||||
{
|
||||
|
@ -1225,8 +1233,9 @@ theme_thumbnail_factory_init (int argc, char *argv[])
|
|||
/* Parent */
|
||||
close (pipe_to_factory_fd[0]);
|
||||
close (pipe_from_factory_fd[1]);
|
||||
#endif /* __APPLE__ */
|
||||
|
||||
async_data.set = FALSE;
|
||||
async_data.theme_name = NULL;
|
||||
async_data.data = g_byte_array_new ();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue