--- gedit-3.16.2/configure.ac	2015-05-15 15:33:11.000000000 +0000
+++ gedit-3.16.2/configure.ac	2015-07-01 11:09:53.211041133 +0000
@@ -121,7 +121,7 @@ AM_CONDITIONAL(PLATFORM_OSX, test "$plat
 dnl check for native osx
 gdk_targets=`$PKG_CONFIG --variable=targets gdk-3.0`
 
-gdk_windowing="x11"
+gdk_windowing="auto"
 
 for target in $gdk_targets;
 do
@@ -145,7 +145,7 @@ fi
 AC_MSG_RESULT([$os_osx])
 AM_CONDITIONAL(OS_OSX, test "$os_osx" = "yes")
 
-AM_CONDITIONAL(GDK_WINDOWING_X11, test "$gdk_windowing" = "x11")
+AM_CONDITIONAL(GDK_WINDOWING_AUTO, test "$gdk_windowing" = "auto")
 
 if test "$platform_osx" = "yes"; then
 	AC_DEFINE([PLATFORM_OSX],[1],[Defined if platform is Mac OSX])
@@ -330,16 +330,6 @@ PKG_CHECK_MODULES(GEDIT, [
 	gsettings-desktop-schemas
 ])
 
-if test "$os_osx" = "no" &&
-   test "$os_win32" = "no"; then
-	PKG_CHECK_MODULES(X11, [
-		x11
-	])
-else
-	X11_CFLAGS=
-	X11_LIBS=
-fi
-
 if test "$platform_win32" = "no"; then
 	PKG_CHECK_MODULES(UNIX, [
 		gio-unix-2.0 >= 2.25.5
@@ -349,8 +339,8 @@ else
 	UNIX_LIBS=
 fi
 
-GEDIT_CFLAGS="$GEDIT_CFLAGS $X11_CFLAGS $UNIX_CFLAGS"
-GEDIT_LIBS="$GEDIT_LIBS $X11_LIBS $UNIX_LIBS"
+GEDIT_CFLAGS="$GEDIT_CFLAGS $UNIX_CFLAGS"
+GEDIT_LIBS="$GEDIT_LIBS $UNIX_LIBS"
 
 AC_SUBST(GEDIT_CFLAGS)
 AC_SUBST(GEDIT_LIBS)
@@ -366,7 +366,7 @@ AC_PATH_PROG(GLIB_MKENUMS, glib-mkenums)
 
 AC_DEFINE(GDK_VERSION_MIN_REQUIRED, GDK_VERSION_3_8, [minimum gdk version])
 
-GNOME_COMPILE_WARNINGS([maximum])
+#GNOME_COMPILE_WARNINGS([maximum])
 
 AC_ARG_ENABLE(deprecations,
               [AS_HELP_STRING([--enable-deprecations],
--- gedit-3.16.2/docs/reference/html/gedit-gedit-utils.html	2015-05-15 15:34:45.000000000 +0000
+++ gedit-3.16.2/docs/reference/html/gedit-gedit-utils.html	2015-07-01 11:16:43.657679686 +0000
@@ -409,7 +409,7 @@ gedit_utils_replace_home_dir_with_tilde
 <pre class="programlisting"><span class="returnvalue">guint</span>
 gedit_utils_get_current_workspace (<em class="parameter"><code><span class="type">GdkScreen</span> *screen</code></em>);</pre>
 <p>Get the currently visible workspace for the <span class="type">GdkScreen</span>.</p>
-<p>If the X11 window property isn't found, 0 (the first workspace)
+<p>If the window property isn't found, 0 (the first workspace)
 is returned.</p>
 <div class="refsect3">
 <a name="id-1.2.18.5.15.6"></a><h4>Parameters</h4>
@@ -597,7 +597,7 @@ gedit_utils_get_current_viewport (<em cl
                                   <em class="parameter"><code><span class="type">gint</span> *x</code></em>,
                                   <em class="parameter"><code><span class="type">gint</span> *y</code></em>);</pre>
 <p>Get the currently visible viewport origin for the <span class="type">GdkScreen</span>.</p>
-<p>If the X11 window property isn't found, (0, 0) is returned.</p>
+<p>If the window property isn't found, (0, 0) is returned.</p>
 <div class="refsect3">
 <a name="id-1.2.18.5.22.6"></a><h4>Parameters</h4>
 <div class="informaltable"><table width="100%" border="0">
@@ -806,4 +806,4 @@ gedit_utils_str_end_truncate (<em class=
 <hr>
           Generated by GTK-Doc V1.21.1</div>
 </body>
-</html>
\ No newline at end of file
+</html>

--- gedit-3.16.2/docs/reference/Makefile.am	2014-09-10 12:24:37.000000000 +0000
+++ gedit-3.16.2/docs/reference/Makefile.am	2015-07-01 11:14:05.887690497 +0000
@@ -29,7 +29,7 @@ CFILE_GLOB = $(top_srcdir)/gedit/*.c
 IGNORE_HFILES =					\
 	gedit-app-osx.h				\
 	gedit-app-win32.h			\
-	gedit-app-x11.h				\
+	gedit-app-auto.h				\
 	gedit-close-confirmation-dialog.h 	\
 	gedit-dirs.h				\
 	gedit-documents-panel.h			\

--- gedit-3.16.2/gedit/gedit-app-auto.c	1970-01-01 00:00:00.000000000 +0000
+++ gedit-3.16.2/gedit/gedit-app-auto.c	2015-07-01 11:00:30.577746328 +0000
@@ -0,0 +1,83 @@
+/*
+ * gedit-app-auto.h
+ * This file is part of gedit
+ *
+ * Copyright (C) 2010 - Jesse van den Kieboom
+ *
+ * gedit is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * gedit is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with gedit; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA  02110-1301  USA
+ */
+
+#include "gedit-app-auto.h"
+
+G_DEFINE_TYPE (GeditAppAuto, gedit_app_auto, GEDIT_TYPE_APP)
+
+static void
+gedit_app_add_platform_data (GApplication    *app,
+                             GVariantBuilder *builder)
+{
+  G_APPLICATION_CLASS (gedit_app_auto_parent_class)->add_platform_data (app, builder);
+
+  /* In the event that we are launched from a terminal we will probably
+   * see that we have DISPLAY set, but not DESKTOP_STARTUP_ID.
+   *
+   * If we are the second instance, we want to bring the window of the
+   * existing instance forward.  Unfortunately, without
+   * DESKTOP_STARTUP_ID being set, we have no timestamp on which to base
+   * the claim that we are the representative of the user's last
+   * interaction.
+   *
+   * We need to fake it by finding out the current timestamp of the
+   * server and sending that along as if we had DESKTOP_STARTUP_ID given
+   * in the first place.
+   *
+   * We want to do this without initialising all of Gtk+, so we can just
+   * talk directly to the X server to find out...
+   *
+   * In order to get the current timestamp, we need to see a
+   * timestamp-tagged event sent by the server.  Property change
+   * notifications are probably the easiest to generate.  We create our
+   * own window so that we don't spam other people who may be watching
+   * for property notifies on the root window...
+   *
+   * We could use any property at all, but we may as well use the
+   * "_NET_WM_USER_TIME_WINDOW" one since that's what we're doing
+   * here...
+   */
+  if (!g_getenv ("DESKTOP_STARTUP_ID"))  //FIXME
+    {
+      gchar *startup_id;
+   // Display *display;
+   // Window window;
+
+      g_variant_builder_add (builder, "{sv}", "desktop-startup-id", g_variant_new_string (startup_id));
+      g_free (startup_id);
+    }
+}
+
+static void
+gedit_app_auto_class_init (GeditAppAutoClass *klass)
+{
+	GApplicationClass *app_class = G_APPLICATION_CLASS (klass);
+
+	app_class->add_platform_data = gedit_app_add_platform_data;
+}
+
+static void
+gedit_app_auto_init (GeditAppAuto *self)
+{
+}
+
+/* ex:set ts=8 noet: */
--- gedit-3.16.2/gedit/gedit-app-auto.h	1970-01-01 00:00:00.000000000 +0000
+++ gedit-3.16.2/gedit/gedit-app-auto.h	2015-07-01 10:45:25.864474955 +0000
@@ -0,0 +1,58 @@
+/*
+ * gedit-app-auto.h
+ * This file is part of gedit
+ *
+ * Copyright (C) 2010 - Jesse van den Kieboom
+ *
+ * gedit is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * gedit is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with gedit; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA  02110-1301  USA
+ */
+
+#ifndef __GEDIT_APP_AUTO_H__
+#define __GEDIT_APP_AUTO_H__
+
+#include "gedit-app.h"
+
+G_BEGIN_DECLS
+
+#define GEDIT_TYPE_APP_AUTO		(gedit_app_auto_get_type ())
+#define GEDIT_APP_AUTO(obj)		(G_TYPE_CHECK_INSTANCE_CAST ((obj), GEDIT_TYPE_APP_AUTO, GeditAppAUTO))
+#define GEDIT_APP_AUTO_CONST(obj)	(G_TYPE_CHECK_INSTANCE_CAST ((obj), GEDIT_TYPE_APP_AUTO, GeditAppAUTO const))
+#define GEDIT_APP_AUTO_CLASS(klass)	(G_TYPE_CHECK_CLASS_CAST ((klass), GEDIT_TYPE_APP_AUTO, GeditAppAutoClass))
+#define GEDIT_IS_APP_AUTO(obj)		(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEDIT_TYPE_APP_AUTO))
+#define GEDIT_IS_APP_AUTO_CLASS(klass)	(G_TYPE_CHECK_CLASS_TYPE ((klass), GEDIT_TYPE_APP_AUTO))
+#define GEDIT_APP_AUTO_GET_CLASS(obj)	(G_TYPE_INSTANCE_GET_CLASS ((obj), GEDIT_TYPE_APP_AUTO, GeditAppAutoClass))
+
+typedef struct _GeditAppAuto		GeditAppAuto;
+typedef struct _GeditAppAutoClass	GeditAppAutoClass;
+typedef struct _GeditAppAutoPrivate	GeditAppAutoPrivate;
+
+struct _GeditAppAuto
+{
+	GeditApp parent;
+};
+
+struct _GeditAppAutoClass
+{
+	GeditAppClass parent_class;
+};
+
+GType	 gedit_app_auto_get_type (void) G_GNUC_CONST;
+
+G_END_DECLS
+
+#endif /* __GEDIT_APP_AUTO_H__ */
+
+/* ex:set ts=8 noet: */

--- gedit-3.16.2/gedit/gedit-app-x11.c	2015-05-11 16:43:03.000000000 +0000
+++ gedit-3.16.2/gedit/gedit-app-x11.c	1970-01-01 00:00:00.000000000 +0000
@@ -1,105 +0,0 @@
-/*
- * gedit-app-x11.h
- * This file is part of gedit
- *
- * Copyright (C) 2010 - Jesse van den Kieboom
- *
- * gedit is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * gedit is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with gedit; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA  02110-1301  USA
- */
-
-#include "gedit-app-x11.h"
-
-#ifdef GDK_WINDOWING_X11
-#include <gdk/gdkx.h>
-#endif
-
-G_DEFINE_TYPE (GeditAppX11, gedit_app_x11, GEDIT_TYPE_APP)
-
-/* This should go in GtkApplication at some point... */
-
-#include <X11/Xatom.h>
-#include <X11/Xlib.h>
-
-static void
-gedit_app_add_platform_data (GApplication    *app,
-                             GVariantBuilder *builder)
-{
-  G_APPLICATION_CLASS (gedit_app_x11_parent_class)->add_platform_data (app, builder);
-
-  /* In the event that we are launched from a terminal we will probably
-   * see that we have DISPLAY set, but not DESKTOP_STARTUP_ID.
-   *
-   * If we are the second instance, we want to bring the window of the
-   * existing instance forward.  Unfortunately, without
-   * DESKTOP_STARTUP_ID being set, we have no timestamp on which to base
-   * the claim that we are the representative of the user's last
-   * interaction.
-   *
-   * We need to fake it by finding out the current timestamp of the
-   * server and sending that along as if we had DESKTOP_STARTUP_ID given
-   * in the first place.
-   *
-   * We want to do this without initialising all of Gtk+, so we can just
-   * talk directly to the X server to find out...
-   *
-   * In order to get the current timestamp, we need to see a
-   * timestamp-tagged event sent by the server.  Property change
-   * notifications are probably the easiest to generate.  We create our
-   * own window so that we don't spam other people who may be watching
-   * for property notifies on the root window...
-   *
-   * We could use any property at all, but we may as well use the
-   * "_NET_WM_USER_TIME_WINDOW" one since that's what we're doing
-   * here...
-   */
-  if (!g_getenv ("DESKTOP_STARTUP_ID") && g_getenv ("DISPLAY") &&
-      GDK_IS_X11_DISPLAY (gdk_display_get_default ()))
-    {
-      gchar *startup_id;
-      Display *display;
-      Window window;
-      XEvent event;
-      Atom atom;
-
-      display = XOpenDisplay (0);
-      window = XCreateWindow (display, DefaultRootWindow (display), 0, 0, 1, 1, 0, 0, InputOnly, 0, 0, NULL);
-      XSelectInput (display, window, PropertyChangeMask);
-      atom = XInternAtom (display, "_NET_WM_USER_TIME_WINDOW", False);
-      XChangeProperty (display, window, atom, XA_WINDOW, 32, PropModeReplace, (void *) &window, 1);
-      XNextEvent (display, &event);
-      g_assert (event.type == PropertyNotify);
-      XCloseDisplay (display);
-
-      startup_id = g_strdup_printf ("_TIME%u", (guint) ((XPropertyEvent *) &event)->time);
-      g_variant_builder_add (builder, "{sv}", "desktop-startup-id", g_variant_new_string (startup_id));
-      g_free (startup_id);
-    }
-}
-
-static void
-gedit_app_x11_class_init (GeditAppX11Class *klass)
-{
-	GApplicationClass *app_class = G_APPLICATION_CLASS (klass);
-
-	app_class->add_platform_data = gedit_app_add_platform_data;
-}
-
-static void
-gedit_app_x11_init (GeditAppX11 *self)
-{
-}
-
-/* ex:set ts=8 noet: */

--- gedit-3.16.2/gedit/gedit-app-x11.h	2015-05-11 16:43:03.000000000 +0000
+++ gedit-3.16.2/gedit/gedit-app-x11.h	1970-01-01 00:00:00.000000000 +0000
@@ -1,58 +0,0 @@
-/*
- * gedit-app-x11.h
- * This file is part of gedit
- *
- * Copyright (C) 2010 - Jesse van den Kieboom
- *
- * gedit is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * gedit is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with gedit; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA  02110-1301  USA
- */
-
-#ifndef __GEDIT_APP_X11_H__
-#define __GEDIT_APP_X11_H__
-
-#include "gedit-app.h"
-
-G_BEGIN_DECLS
-
-#define GEDIT_TYPE_APP_X11		(gedit_app_x11_get_type ())
-#define GEDIT_APP_X11(obj)		(G_TYPE_CHECK_INSTANCE_CAST ((obj), GEDIT_TYPE_APP_X11, GeditAppX11))
-#define GEDIT_APP_X11_CONST(obj)	(G_TYPE_CHECK_INSTANCE_CAST ((obj), GEDIT_TYPE_APP_X11, GeditAppX11 const))
-#define GEDIT_APP_X11_CLASS(klass)	(G_TYPE_CHECK_CLASS_CAST ((klass), GEDIT_TYPE_APP_X11, GeditAppX11Class))
-#define GEDIT_IS_APP_X11(obj)		(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEDIT_TYPE_APP_X11))
-#define GEDIT_IS_APP_X11_CLASS(klass)	(G_TYPE_CHECK_CLASS_TYPE ((klass), GEDIT_TYPE_APP_X11))
-#define GEDIT_APP_X11_GET_CLASS(obj)	(G_TYPE_INSTANCE_GET_CLASS ((obj), GEDIT_TYPE_APP_X11, GeditAppX11Class))
-
-typedef struct _GeditAppX11		GeditAppX11;
-typedef struct _GeditAppX11Class	GeditAppX11Class;
-typedef struct _GeditAppX11Private	GeditAppX11Private;
-
-struct _GeditAppX11
-{
-	GeditApp parent;
-};
-
-struct _GeditAppX11Class
-{
-	GeditAppClass parent_class;
-};
-
-GType	 gedit_app_x11_get_type (void) G_GNUC_CONST;
-
-G_END_DECLS
-
-#endif /* __GEDIT_APP_X11_H__ */
-
-/* ex:set ts=8 noet: */

--- gedit-3.16.2/gedit/gedit.c	2015-04-20 07:32:53.000000000 +0000
+++ gedit-3.16.2/gedit/gedit.c	2015-07-01 11:02:41.344404040 +0000
@@ -29,7 +29,7 @@
 #ifdef G_OS_WIN32
 #include "gedit-app-win32.h"
 #else
-#include "gedit-app-x11.h"
+#include "gedit-app-auto.h"
 #endif
 #endif
 
@@ -121,7 +121,7 @@ main (int argc, char *argv[])
 
 	type = GEDIT_TYPE_APP_WIN32;
 #else
-	type = GEDIT_TYPE_APP_X11;
+	type = GEDIT_TYPE_APP_AUTO;
 #endif
 #endif
 

--- gedit-3.16.2/gedit/gedit-utils.c	2015-05-11 16:43:03.000000000 +0000
+++ gedit-3.16.2/gedit/gedit-utils.c	2015-07-01 11:06:08.051056554 +0000
@@ -38,14 +38,6 @@
 #include <glib/gstdio.h>
 #include <gio/gio.h>
 
-/* For the workspace/viewport stuff */
-#ifdef GDK_WINDOWING_X11
-#include <gdk/gdkx.h>
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <X11/Xatom.h>
-#endif
-
 #ifdef G_OS_UNIX
 #include <unistd.h>
 #include <sys/stat.h>
@@ -575,53 +567,15 @@ gedit_utils_replace_home_dir_with_tilde
  *
  * Get the currently visible workspace for the #GdkScreen.
  *
- * If the X11 window property isn't found, 0 (the first workspace)
+ * If the window property isn't found, 0 (the first workspace)
  * is returned.
  */
 guint
 gedit_utils_get_current_workspace (GdkScreen *screen)
 {
-#ifdef GDK_WINDOWING_X11
-	GdkWindow *root_win;
-	GdkDisplay *display;
-	guint ret = 0;
-
-	g_return_val_if_fail (GDK_IS_SCREEN (screen), 0);
-
-	root_win = gdk_screen_get_root_window (screen);
-	display = gdk_screen_get_display (screen);
 
-	if (GDK_IS_X11_DISPLAY (display))
-	{
-		Atom type;
-		gint format;
-		gulong nitems;
-		gulong bytes_after;
-		guint *current_desktop;
-		gint err, result;
-
-		gdk_error_trap_push ();
-		result = XGetWindowProperty (GDK_DISPLAY_XDISPLAY (display), GDK_WINDOW_XID (root_win),
-					     gdk_x11_get_xatom_by_name_for_display (display, "_NET_CURRENT_DESKTOP"),
-					     0, G_MAXLONG, False, XA_CARDINAL, &type, &format, &nitems,
-					     &bytes_after, (gpointer) &current_desktop);
-		err = gdk_error_trap_pop ();
-
-		if (err != Success || result != Success)
-			return ret;
+	return 0;  //FIXME
 
-		if (type == XA_CARDINAL && format == 32 && nitems > 0)
-			ret = current_desktop[0];
-
-		XFree (current_desktop);
-	}
-
-	return ret;
-#else
-	/* FIXME: on mac etc proably there are native APIs
-	 * to get the current workspace etc */
-	return 0;
-#endif
 }
 
 /**
@@ -639,10 +593,9 @@ gedit_utils_get_current_workspace (GdkSc
 guint
 gedit_utils_get_window_workspace (GtkWindow *gtkwindow)
 {
-#ifdef GDK_WINDOWING_X11
+#ifdef GDK_WINDOWING_AUTO
 	GdkWindow *window;
 	GdkDisplay *display;
-	Atom type;
 	gint format;
 	gulong nitems;
 	gulong bytes_after;
@@ -656,23 +609,7 @@ gedit_utils_get_window_workspace (GtkWin
 	window = gtk_widget_get_window (GTK_WIDGET (gtkwindow));
 	display = gdk_window_get_display (window);
 
-	if (GDK_IS_X11_DISPLAY (display))
-	{
-		gdk_error_trap_push ();
-		result = XGetWindowProperty (GDK_DISPLAY_XDISPLAY (display), GDK_WINDOW_XID (window),
-					     gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_DESKTOP"),
-					     0, G_MAXLONG, False, XA_CARDINAL, &type, &format, &nitems,
-					     &bytes_after, (gpointer) &workspace);
-		err = gdk_error_trap_pop ();
-
-		if (err != Success || result != Success)
-			return ret;
-
-		if (type == XA_CARDINAL && format == 32 && nitems > 0)
-			ret = workspace[0];
-
-		XFree (workspace);
-	}
+	
 
 	return ret;
 #else
@@ -690,55 +627,18 @@ gedit_utils_get_window_workspace (GtkWin
  *
  * Get the currently visible viewport origin for the #GdkScreen.
  *
- * If the X11 window property isn't found, (0, 0) is returned.
+ * If the window property isn't found, (0, 0) is returned.
  */
 void
 gedit_utils_get_current_viewport (GdkScreen    *screen,
 				  gint         *x,
 				  gint         *y)
 {
-#ifdef GDK_WINDOWING_X11
-	GdkWindow *root_win;
-	GdkDisplay *display;
-	Atom type;
-	gint format;
-	gulong nitems;
-	gulong bytes_after;
-	gulong *coordinates;
-	gint err, result;
-
-	g_return_if_fail (GDK_IS_SCREEN (screen));
-	g_return_if_fail (x != NULL && y != NULL);
+#ifdef GDK_WINDOWING_AUTO   //FIXME
 
-	/* Default values for the viewport origin */
 	*x = 0;
-	*y = 0;
-
-	root_win = gdk_screen_get_root_window (screen);
-	display = gdk_screen_get_display (screen);
-
-	if (GDK_IS_X11_DISPLAY (display))
-	{
-		gdk_error_trap_push ();
-		result = XGetWindowProperty (GDK_DISPLAY_XDISPLAY (display), GDK_WINDOW_XID (root_win),
-					     gdk_x11_get_xatom_by_name_for_display (display, "_NET_DESKTOP_VIEWPORT"),
-					     0, G_MAXLONG, False, XA_CARDINAL, &type, &format, &nitems,
-					     &bytes_after, (void*) &coordinates);
-		err = gdk_error_trap_pop ();
-
-		if (err != Success || result != Success)
-			return;
-
-		if (type != XA_CARDINAL || format != 32 || nitems < 2)
-		{
-			XFree (coordinates);
-			return;
-		}
-
-		*x = coordinates[0];
-		*y = coordinates[1];
-		XFree (coordinates);
-	}
+	*y = 0;			
+	
 #else
 	/* FIXME: on mac etc proably there are native APIs
 	 * to get the current workspace etc */

--- gedit-3.16.2/gedit/Makefile.am	2015-05-11 16:43:03.000000000 +0000
+++ gedit-3.16.2/gedit/Makefile.am	2015-07-01 15:11:41.718698125 +0000
@@ -78,18 +78,18 @@ gedit/gedit-res.o: gedit/gedit.rc
 gedit_gedit_LDADD += gedit/gedit-res.o
 endif
 
-# X11 convenience library
-if GDK_WINDOWING_X11
-noinst_LTLIBRARIES += gedit/libx11.la
+# Auto convenience library
+if GDK_WINDOWING_AUTO
+noinst_LTLIBRARIES += gedit/libauto.la
 
-gedit_libx11_la_SOURCES =		\
-	gedit/gedit-app-x11.c		\
-	gedit/gedit-app-x11.h
+gedit_libauto_la_SOURCES =		\
+	gedit/gedit-app-auto.c		\
+	gedit/gedit-app-auto.h
 
-gedit_libx11_la_CPPFLAGS = $(gedit_common_cppflags)
-gedit_libx11_la_CFLAGS = $(gedit_common_cflags)
+gedit_libauto_la_CPPFLAGS = $(gedit_common_cppflags)
+gedit_libauto_la_CFLAGS = $(gedit_common_cflags)
 
-gedit_libgedit_la_LIBADD += gedit/libx11.la
+gedit_libgedit_la_LIBADD += gedit/libauto.la
 endif
 
 gedit_built_sources =			\
--- gedit-3.16.2/m4/intltool.m4	2015-05-15 15:33:41.000000000 +0000
+++ gedit-3.16.2/m4/intltool.m4	2015-07-01 06:55:53.594723741 +0000
@@ -172,9 +172,9 @@ dnl The following CONFIG_COMMANDS should
 dnl of config.status.
 AC_CONFIG_COMMANDS_PRE([
   AC_CONFIG_COMMANDS([$1/stamp-it], [
-    if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
-       AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
-    fi
+    #if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
+    #   AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
+    #fi
     rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
     >"$1/stamp-it.tmp"
     [sed '/^#/d
