with_gtk4="no"
fi
+# PR3594893, do not build with gtk4 for FreeBSD by default. Build with gtk3
+# by default as previous behavior, even both gtk4 and gtk3 libs are availale.
+# Only build with gtk4 when explicitly set by "--with_gtk4"
+if test "$with_gtk4" = "auto" && test "$os" = "freebsd" ; then
+ with_gtk4="no"
+fi
+
AC_ARG_ENABLE(
docs,
AS_HELP_STRING(
* copyPasteDnDUtil.cpp --
*
* This is the utility file to keep the common API's
- * for Copy/Paste and Drag/Drop functionality.
+ * for Copy/Paste and Drag/Drop functionality.
*
*/
#include "dndFileContentsUtil.h"
#include "dndFileList.hh"
#include "copyPasteUIX11.h"
+extern "C" {
#include "cpNameUtil.h"
+}
/*
#if !defined(DETWNDTEST)
#include "dnd.h"
#endif
+/* Need to check USE_UINPUT, as FreeBSD does not support this */
+#ifdef USE_UINPUT
#include "fakeMouseWayland/fakeMouseWayland.h"
+#endif
using source_drag_begin_handler = void (const Glib::RefPtr< Gdk::Drag > &, void *);
using source_drag_end_handler = void (const Glib::RefPtr< Gdk::Drag > &, bool, void *);
// Let GTK preload data early.
mTarget->set_preload(true);
+/* Need to check USE_UINPUT, as FreeBSD does not support this */
+#ifdef USE_UINPUT
// Uinput simulation for wayland backend.
if (UseUInput_fd != -1) {
g_debug("%s: Using uinput simulation", __FUNCTION__);
// Disconnect the connection to X Server.
XCloseDisplay(display);
}
+#endif
return;
fail:
if (mWnd) {
DragDetWnd::~DragDetWnd()
{
+#ifdef USE_UINPUT
if (mUseUInput) {
FakeMouse_Destory();
}
+#endif
if (mWnd) {
delete mWnd;
mWnd = NULL;
* happen more reliably on KDE, but isn't necessary on GNOME.
*/
if (mUseUInput) {
+#ifdef USE_UINPUT
FakeMouse_Move(x, y);
FakeMouse_Move(x + 1, y + 1);
g_debug("%s: Uinput simulating moving mouse\n", __FUNCTION__);
+#endif
} else {
XTestFakeMotionEvent(dndXDisplay, -1, x, y, CurrentTime);
XTestFakeMotionEvent(dndXDisplay, -1, x + 1, y + 1, CurrentTime);
g_debug("%s: faking left mouse button %s\n", __FUNCTION__,
buttonPress ? "press" : "release");
if (mUseUInput) {
+#ifdef USE_UINPUT
ret = FakeMouse_Click(buttonPress);
g_debug("%s: Uinput simulating click mouse with ret %d\n", __FUNCTION__, ret);
+#endif
}
else {
XTestFakeButtonEvent(dndXDisplay, 1, buttonPress, CurrentTime);