diff -rupN mtPaint-199472ad6a4ecee6c8583fb5a504a2e99712b4fc-orig/src/main.c mtPaint-199472ad6a4ecee6c8583fb5a504a2e99712b4fc/src/main.c
--- mtPaint-199472ad6a4ecee6c8583fb5a504a2e99712b4fc-orig/src/main.c	2021-10-15 08:33:32.004374733 +0300
+++ mtPaint-199472ad6a4ecee6c8583fb5a504a2e99712b4fc/src/main.c	2021-10-15 08:36:11.248369594 +0300
@@ -396,7 +396,7 @@ int main( int argc, char *argv[] )
 	/* No floating random stuff over canvas */
 	putenv("GTK_OVERLAY_SCROLLING=0");
 	/* Prevent confusion */
-#ifdef GDK_WINDOWING_X11
+#if 0
 	gdk_set_allowed_backends("x11");
 #endif
 #else
diff -rupN mtPaint-199472ad6a4ecee6c8583fb5a504a2e99712b4fc-orig/src/mygtk.c mtPaint-199472ad6a4ecee6c8583fb5a504a2e99712b4fc/src/mygtk.c
--- mtPaint-199472ad6a4ecee6c8583fb5a504a2e99712b4fc-orig/src/mygtk.c	2021-10-15 08:33:32.004374733 +0300
+++ mtPaint-199472ad6a4ecee6c8583fb5a504a2e99712b4fc/src/mygtk.c	2021-10-15 08:37:01.076367986 +0300
@@ -2620,7 +2620,7 @@ int import_pixmap(pixmap_info *p, XID_ty
 	{
 /* This ugly code imports X Window System's pixmaps; this allows mtPaint to
  * receive images from programs such as XPaint */
-#if (GTK_MAJOR_VERSION == 3) && defined GDK_WINDOWING_X11
+#if 0
 		cairo_surface_t *s;
 		GdkDisplay *d = gtk_widget_get_display(main_window);
 		Display *disp = GDK_DISPLAY_XDISPLAY(d);
@@ -2646,7 +2646,6 @@ int import_pixmap(pixmap_info *p, XID_ty
 			return (TRUE);
 		}
 		cairo_surface_destroy(s);
-#elif (GTK_MAJOR_VERSION == 1) || defined GDK_WINDOWING_X11
 		int w, h, d, dd;
 
 		gdk_error_trap_push(); // No guarantee that we got a valid pixmap
@@ -6004,7 +6003,7 @@ double window_dpi(GtkWidget *win)
 	g_value_init(&v, G_TYPE_INT);
 	if (gdk_screen_get_setting(sc, "gtk-xft-dpi", &v))
 		return (g_value_get_int(&v) / (double)1024.0);
-#ifdef GDK_WINDOWING_X11
+#if 0
 	{
 		/* Get DPI from Xft */
 		char *e, *v = XGetDefault(GDK_SCREEN_XDISPLAY(sc), "Xft", "dpi");
