diff -ruN ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4.orig/druid/examples/markdown_preview.rs ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4/druid/examples/markdown_preview.rs
--- ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4.orig/druid/examples/markdown_preview.rs	2022-08-30 12:25:50.000000000 +0100
+++ ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4/druid/examples/markdown_preview.rs	2022-09-05 12:03:16.089187000 +0100
@@ -239,7 +239,7 @@
     {
         base = base.entry(druid::platform_menus::mac::application::default())
     }
-    #[cfg(any(target_os = "windows", target_os = "linux", target_os = "openbsd"))]
+    #[cfg(any(target_os = "windows", target_os = "freebsd", target_os = "linux", target_os = "openbsd"))]
     {
         base = base.entry(druid::platform_menus::win::file::default());
     }
diff -ruN ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4.orig/druid/examples/multiwin.rs ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4/druid/examples/multiwin.rs
--- ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4.orig/druid/examples/multiwin.rs	2022-08-30 12:25:50.000000000 +0100
+++ ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4/druid/examples/multiwin.rs	2022-09-05 12:03:39.328247000 +0100
@@ -200,7 +200,7 @@
     {
         base = druid::platform_menus::mac::menu_bar();
     }
-    #[cfg(any(target_os = "windows", target_os = "linux", target_os = "openbsd"))]
+    #[cfg(any(target_os = "windows", target_os = "freebsd", target_os = "linux", target_os = "openbsd"))]
     {
         base = base.entry(druid::platform_menus::win::file::default());
     }
diff -ruN ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4.orig/druid/examples/textbox.rs ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4/druid/examples/textbox.rs
--- ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4.orig/druid/examples/textbox.rs	2022-08-30 12:25:50.000000000 +0100
+++ ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4/druid/examples/textbox.rs	2022-09-05 12:03:29.140275000 +0100
@@ -98,7 +98,7 @@
     {
         base = base.entry(druid::platform_menus::mac::application::default())
     }
-    #[cfg(any(target_os = "windows", target_os = "linux", target_os = "openbsd"))]
+    #[cfg(any(target_os = "windows", target_os = "freebsd", target_os = "linux", target_os = "openbsd"))]
     {
         base = base.entry(druid::platform_menus::win::file::default());
     }
diff -ruN ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4.orig/druid/src/menu/mod.rs ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4/druid/src/menu/mod.rs
--- ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4.orig/druid/src/menu/mod.rs	2022-08-30 12:25:50.000000000 +0100
+++ ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4/druid/src/menu/mod.rs	2022-09-05 12:03:02.905122000 +0100
@@ -170,7 +170,7 @@
         #[cfg(target_os = "macos")]
         return Some(MenuManager::new(|_, _, _| sys::mac::application::default()));
 
-        #[cfg(any(target_os = "windows", target_os = "linux", target_os = "openbsd"))]
+        #[cfg(any(target_os = "windows", target_os = "freebsd", target_os = "linux", target_os = "openbsd"))]
         return None;
 
         // we want to explicitly handle all platforms; log if a platform is missing.
diff -ruN ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4.orig/druid/src/widget/textbox.rs ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4/druid/src/widget/textbox.rs
--- ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4.orig/druid/src/widget/textbox.rs	2022-08-30 12:25:50.000000000 +0100
+++ ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4/druid/src/widget/textbox.rs	2022-09-05 12:02:53.957452000 +0100
@@ -34,6 +34,7 @@
 
 const CURSOR_BLINK_DURATION: Duration = Duration::from_millis(500);
 const MAC_OR_LINUX_OR_OBSD: bool = cfg!(any(
+    target_os = "freebsd",
     target_os = "macos",
     target_os = "linux",
     target_os = "openbsd"
diff -ruN ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4.orig/druid-shell/Cargo.toml ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4/druid-shell/Cargo.toml
--- ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4.orig/druid-shell/Cargo.toml	2022-08-30 12:25:50.000000000 +0100
+++ ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4/druid-shell/Cargo.toml	2022-09-05 12:07:27.797905000 +0100
@@ -101,7 +101,7 @@
 bitflags = "1.2.1"
 cgl = "0.3"
 
-[target.'cfg(any(target_os="linux", target_os="openbsd"))'.dependencies]
+[target.'cfg(any(target_os ="freebsd", target_os="linux", target_os="openbsd"))'.dependencies]
 gl_loader = "0.1.2"
 ashpd = { version = "0.3.0", optional = true }
 # TODO(x11/dependencies): only use feature "xcb" if using X11
diff -ruN ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4.orig/druid-shell/build.rs ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4/druid-shell/build.rs
--- ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4.orig/druid-shell/build.rs	2022-08-30 12:25:50.000000000 +0100
+++ ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4/druid-shell/build.rs	2022-09-05 12:02:40.562752000 +0100
@@ -7,7 +7,8 @@
     use std::env;
     use std::path::PathBuf;
 
-    if env::var("CARGO_CFG_TARGET_OS").unwrap() != "linux"
+    if env::var("CARGO_CFG_TARGET_OS").unwrap() != "freebsd"
+        && env::var("CARGO_CFG_TARGET_OS").unwrap() != "linux"
         && env::var("CARGO_CFG_TARGET_OS").unwrap() != "openbsd"
     {
         return;
diff -ruN ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4.orig/druid-shell/src/backend/mod.rs ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4/druid-shell/src/backend/mod.rs
--- ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4.orig/druid-shell/src/backend/mod.rs	2022-08-30 12:25:50.000000000 +0100
+++ ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4/druid-shell/src/backend/mod.rs	2022-09-05 12:00:26.214282000 +0100
@@ -28,36 +28,36 @@
 #[cfg(target_os = "macos")]
 pub(crate) mod shared;
 
-#[cfg(all(feature = "x11", any(target_os = "linux", target_os = "openbsd")))]
+#[cfg(all(feature = "x11", any(target_os = "freebsd", target_os = "linux", target_os = "openbsd")))]
 mod x11;
-#[cfg(all(feature = "x11", any(target_os = "linux", target_os = "openbsd")))]
+#[cfg(all(feature = "x11", any(target_os = "freebsd", target_os = "linux", target_os = "openbsd")))]
 pub use x11::*;
-#[cfg(all(feature = "x11", any(target_os = "linux", target_os = "openbsd")))]
+#[cfg(all(feature = "x11", any(target_os = "freebsd", target_os = "linux", target_os = "openbsd")))]
 pub(crate) mod shared;
 
-#[cfg(all(feature = "wayland", any(target_os = "linux", target_os = "openbsd")))]
+#[cfg(all(feature = "wayland", any(target_os = "freebsd", target_os = "linux", target_os = "openbsd")))]
 mod wayland;
-#[cfg(all(feature = "wayland", any(target_os = "linux", target_os = "openbsd")))]
+#[cfg(all(feature = "wayland", any(target_os = "freebsd", target_os = "linux", target_os = "openbsd")))]
 pub use wayland::*;
-#[cfg(all(feature = "wayland", any(target_os = "linux", target_os = "openbsd")))]
+#[cfg(all(feature = "wayland", any(target_os = "freebsd", target_os = "linux", target_os = "openbsd")))]
 pub(crate) mod shared;
 
 #[cfg(all(
     not(feature = "x11"),
     not(feature = "wayland"),
-    any(target_os = "linux", target_os = "openbsd")
+    any(target_os = "freebsd", target_os = "linux", target_os = "openbsd")
 ))]
 mod gtk;
 #[cfg(all(
     not(feature = "x11"),
     not(feature = "wayland"),
-    any(target_os = "linux", target_os = "openbsd")
+    any(target_os = "freebsd", target_os = "linux", target_os = "openbsd")
 ))]
 pub use self::gtk::*;
 #[cfg(all(
     not(feature = "x11"),
     not(feature = "wayland"),
-    any(target_os = "linux", target_os = "openbsd")
+    any(target_os = "freebsd", target_os = "linux", target_os = "openbsd")
 ))]
 pub(crate) mod shared;
 
diff -ruN ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4.orig/druid-shell/src/backend/shared/keyboard.rs ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4/druid-shell/src/backend/shared/keyboard.rs
--- ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4.orig/druid-shell/src/backend/shared/keyboard.rs	2022-08-30 12:25:50.000000000 +0100
+++ ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4/druid-shell/src/backend/shared/keyboard.rs	2022-09-05 11:59:19.998724000 +0100
@@ -20,7 +20,7 @@
 #[cfg(any(
     all(
         any(feature = "x11", feature = "wayland"),
-        any(target_os = "linux", target_os = "openbsd")
+        any(target_os = "freebsd", target_os = "linux", target_os = "openbsd")
     ),
     target_os = "macos"
 ))]
@@ -57,7 +57,7 @@
     }
 }
 
-#[cfg(any(target_os = "linux", target_os = "openbsd"))]
+#[cfg(any(target_os = "freebsd", target_os = "linux", target_os = "openbsd"))]
 /// Map hardware keycode to code.
 ///
 /// In theory, the hardware keycode is device dependent, but in
diff -ruN ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4.orig/druid-shell/src/backend/shared/mod.rs ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4/druid-shell/src/backend/shared/mod.rs
--- ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4.orig/druid-shell/src/backend/shared/mod.rs	2022-08-30 12:25:50.000000000 +0100
+++ ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4/druid-shell/src/backend/shared/mod.rs	2022-09-05 12:00:02.809946000 +0100
@@ -15,7 +15,7 @@
 //! Logic that is shared by more than one backend.
 
 cfg_if::cfg_if! {
-    if #[cfg(any(target_os = "macos", target_os = "linux", target_os = "openbsd"))] {
+    if #[cfg(any(target_os = "freebsd", target_os = "macos", target_os = "linux", target_os = "openbsd"))] {
         mod keyboard;
         pub use keyboard::*;
     }
diff -ruN ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4.orig/druid-shell/src/clipboard.rs ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4/druid-shell/src/clipboard.rs
--- ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4.orig/druid-shell/src/clipboard.rs	2022-08-30 12:25:50.000000000 +0100
+++ ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4/druid-shell/src/clipboard.rs	2022-09-05 12:01:09.188366000 +0100
@@ -226,7 +226,7 @@
     } else {
         impl ClipboardFormat {
             cfg_if::cfg_if! {
-                if #[cfg(any(target_os = "linux", target_os = "openbsd"))] {
+                if #[cfg(any(target_os = "freebsd", target_os = "linux", target_os = "openbsd"))] {
                     // trial and error; this is the most supported string type for gtk?
                     pub const TEXT: &'static str = "UTF8_STRING";
                 } else {
diff -ruN ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4.orig/druid-shell/src/dialog.rs ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4/druid-shell/src/dialog.rs
--- ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4.orig/druid-shell/src/dialog.rs	2022-08-30 12:25:50.000000000 +0100
+++ ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4/druid-shell/src/dialog.rs	2022-09-05 12:00:45.943691000 +0100
@@ -38,7 +38,7 @@
 
 /// Type of file dialog.
 #[cfg(not(any(
-    all(feature = "x11", any(target_os = "linux", target_os = "openbsd")),
+    all(feature = "x11", any(target_os = "freebsd", target_os = "linux", target_os = "openbsd")),
     feature = "wayland"
 )))]
 #[derive(Clone, Copy, PartialEq)]
diff -ruN ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4.orig/druid-shell/src/lib.rs ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4/druid-shell/src/lib.rs
--- ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4.orig/druid-shell/src/lib.rs	2022-08-30 12:25:50.000000000 +0100
+++ ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4/druid-shell/src/lib.rs	2022-09-05 12:00:56.778285000 +0100
@@ -38,7 +38,7 @@
 // Rename `gtk_rs` back to `gtk`.
 // This allows us to use `gtk` as the feature name.
 // The `target_os` requirement is there to exclude anything `wasm` like.
-#[cfg(all(any(target_os = "linux", target_os = "openbsd"), feature = "gtk"))]
+#[cfg(all(any(target_os = "freebsd", target_os = "linux", target_os = "openbsd"), feature = "gtk"))]
 extern crate gtk_rs as gtk;
 
 // Reexport the version of `image` we are using.
diff -ruN ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4.orig/druid-shell/src/platform/mod.rs ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4/druid-shell/src/platform/mod.rs
--- ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4.orig/druid-shell/src/platform/mod.rs	2022-08-30 12:25:50.000000000 +0100
+++ ../druid-3e53ab2159b7154fea77731ff7633970a40cb7b4/druid-shell/src/platform/mod.rs	2022-09-05 12:01:26.654371000 +0100
@@ -14,7 +14,7 @@
 
 //! Platorm specific extensions.
 
-#[cfg(any(doc, any(target_os = "linux", target_os = "openbsd")))]
+#[cfg(any(doc, any(target_os = "freebsd", target_os = "linux", target_os = "openbsd")))]
 pub mod linux;
 
 #[cfg(any(doc, target_os = "macos"))]
