]> Pileus Git - ~andy/gtk/blobdiff - gdk/gdk.c
Put the pathbar in the 'Save in folder:' row in Save mode
[~andy/gtk] / gdk / gdk.c
index 47e4742f969b0faebe265e3404ca4c466276dbdc..b632f4c5f8d3bea6b5b641e646e0144440c7f117 100644 (file)
--- a/gdk/gdk.c
+++ b/gdk/gdk.c
  * The #GDK_WINDOWING_X11 macro is defined if the X11 backend
  * is supported.
  *
- * Use this macro to guard code that is specific to the X11-backend.
- * Since GDK may be configured with multiple backends, an additional
- * runtime check for the used backend is recommended:
- *
- * |[
- * #ifdef GDK_WINDOWING_X11
- *   if (GDK_IS_X11_DISPLAY (display))
- *     {
- *       /* make X11-specific calls here */
- *     }
- *   else
- * #endif
- * #ifdef GDK_WINDOWING_QUARTZ
- *   if (GDK_IS_QUARTZ_DISPLAY (display))
- *     {
- *       /* make Quartz-specific calls here &ast/
- *     }
- *   else
- * #endif
- *   g_error ("Unsupported GDK backend");
- * ]|
+ * Use this macro to guard code that is specific to the X11 backend.
  */
 
 /**
@@ -82,6 +62,8 @@
  *
  * The #GDK_WINDOWING_WIN32 macro is defined if the Win32 backend
  * is supported.
+ *
+ * Use this macro to guard code that is specific to the Win32 backend.
  */
 
 /**
@@ -89,6 +71,8 @@
  *
  * The #GDK_WINDOWING_QUARTZ macro is defined if the Quartz backend
  * is supported.
+ *
+ * Use this macro to guard code that is specific to the Quartz backend.
  */
 
 typedef struct _GdkPredicate  GdkPredicate;
@@ -129,7 +113,6 @@ static const GDebugKey gdk_debug_keys[] = {
   {"dnd",           GDK_DEBUG_DND},
   {"xim",           GDK_DEBUG_XIM},
   {"nograbs",       GDK_DEBUG_NOGRABS},
-  {"colormap",      GDK_DEBUG_COLORMAP},
   {"input",         GDK_DEBUG_INPUT},
   {"cursor",        GDK_DEBUG_CURSOR},
   {"multihead",     GDK_DEBUG_MULTIHEAD},
@@ -232,6 +215,8 @@ gdk_add_option_entries_libgtk_only (GOptionGroup *group)
 void
 gdk_pre_parse_libgtk_only (void)
 {
+  const char *rendering_mode;
+
   gdk_initialized = TRUE;
 
   /* We set the fallback program class here, rather than lazily in
@@ -253,11 +238,22 @@ gdk_pre_parse_libgtk_only (void)
 
   if (getenv ("GDK_NATIVE_WINDOWS"))
     {
-      _gdk_native_windows = TRUE;
-      /* Ensure that this is not propagated to spawned applications */
+      g_warning ("The GDK_NATIVE_WINDOWS environment variable is not supported in GTK3.\n"
+                 "See the documentation for gdk_window_ensure_native() on how to get native windows.");
       g_unsetenv ("GDK_NATIVE_WINDOWS");
     }
 
+  rendering_mode = g_getenv ("GDK_RENDERING");
+  if (rendering_mode)
+    {
+      if (g_str_equal (rendering_mode, "similar"))
+        _gdk_rendering_mode = GDK_RENDERING_MODE_SIMILAR;
+      else if (g_str_equal (rendering_mode, "image"))
+        _gdk_rendering_mode = GDK_RENDERING_MODE_IMAGE;
+      else if (g_str_equal (rendering_mode, "recording"))
+        _gdk_rendering_mode = GDK_RENDERING_MODE_RECORDING;
+    }
+
   g_type_init ();
 
   /* Do any setup particular to the windowing system */
@@ -323,7 +319,7 @@ gdk_parse_args (int    *argc,
  *
  * Since: 2.2
  */
-G_CONST_RETURN gchar *
+const gchar *
 gdk_get_display_arg_name (void)
 {
   if (!_gdk_display_arg_name)
@@ -1056,7 +1052,7 @@ gdk_threads_add_timeout_seconds (guint       interval,
  *
  * Returns: the program class.
  */
-G_CONST_RETURN char *
+const char *
 gdk_get_program_class (void)
 {
   return gdk_progclass;