return TRUE;
}
-/* This here before inclusion of gtkprivate.h so that it sees the
- * original GTK_LOCALEDIR definition. Yeah, this is a bit sucky.
+/* These here before inclusion of gtkprivate.h so that the original
+ * GTK_LIBDIR and GTK_LOCALEDIR definitions are seen. Yeah, this is a
+ * bit sucky.
*/
+const gchar *
+_gtk_get_libdir (void)
+{
+ static char *gtk_libdir = NULL;
+ if (gtk_libdir == NULL)
+ {
+ gchar *root = g_win32_get_package_installation_directory_of_module (gtk_dll);
+ gchar *slash = strrchr (root, '\\');
+ if (g_ascii_strcasecmp (slash + 1, ".libs") == 0)
+ gtk_libdir = GTK_LIBDIR;
+ else
+ gtk_libdir = g_build_filename (root, "lib", NULL);
+ g_free (root);
+ }
+
+ return gtk_libdir;
+}
+
const gchar *
_gtk_get_localedir (void)
{
return gtk_datadir;
}
-const gchar *
-_gtk_get_libdir (void)
-{
- static char *gtk_libdir = NULL;
- if (gtk_libdir == NULL)
- {
- gchar *root = g_win32_get_package_installation_directory_of_module (gtk_dll);
- gtk_libdir = g_build_filename (root, "lib", NULL);
- g_free (root);
- }
-
- return gtk_libdir;
-}
-
const gchar *
_gtk_get_sysconfdir (void)
{
gettext_initialization ();
+#ifdef SIGPIPE
+ signal (SIGPIPE, SIG_IGN);
+#endif
+
if (g_fatal_warnings)
{
GLogLevelFlags fatal_mask;
gboolean
gtk_init_with_args (int *argc,
char ***argv,
- char *parameter_string,
+ const char *parameter_string,
GOptionEntry *entries,
- char *translation_domain,
+ const char *translation_domain,
GError **error)
{
GOptionContext *context;
* the GUI for some reason. If you want your program to fall back to a
* textual interface you want to call gtk_init_check() instead.
* </para></note>
+ *
+ * <note><para>
+ * Since 2.18, GTK+ calls <literal>signal (SIGPIPE, SIG_IGN)</literal>
+ * during initialization, to ignore SIGPIPE signals, since these are
+ * almost never wanted in graphical applications. If you do need to
+ * handle SIGPIPE for some reason, reset the handler after gtk_init(),
+ * but notice that other libraries (e.g. libdbus or gvfs) might do
+ * similar things.
+ * </para></note>
**/
void
gtk_init (int *argc, char ***argv)
gdk_window_end_paint (event->any.window);
}
else
- gtk_widget_send_expose (event_widget, event);
+ {
+ /* The app may paint with a previously allocated cairo_t,
+ which will draw directly to the window. We can't catch cairo
+ drap operatoins to automatically flush the window, thus we
+ need to explicitly flush any outstanding moves or double
+ buffering */
+ gdk_window_flush (event->any.window);
+ gtk_widget_send_expose (event_widget, event);
+ }
break;
case GDK_PROPERTY_NOTIFY: