aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Palmen <felix@palmen-it.de>2021-09-04 09:31:06 +0000
committerTobias C. Berner <tcberner@FreeBSD.org>2021-09-04 11:16:14 +0000
commitce0e0139a4eea8fb76d6a49558903f7a9653c574 (patch)
treeea36381664f4fafef249a8fca78a97a4cd744b8c
parente858b5d6ba6d9901502eb8ee819616ec42736206 (diff)
downloadports-ce0e0139a4eea8fb76d6a49558903f7a9653c574.tar.gz
ports-ce0e0139a4eea8fb76d6a49558903f7a9653c574.zip
net/freerdp: add workaround for focus bug of WM
Some WMs (for example fvwm and fluxbox) intermittently steal focus during attempts to drag something with the mouse on the remote machine, effectively making it impossible to drag. This behavior seems to also depend on the configuration of the WM. Add an optional patch to work around this problem, activated by the new option BROKENFOCUS. Note that this workaround may lead to a wrong state of keyboard modifiers after focus changes, so only enable if if you really need to. PR: 254908 Approved by: VVD <vvd@unislabs.com> (maintainer)
-rw-r--r--net/freerdp/Makefile8
-rw-r--r--net/freerdp/files/extra-patch-focusbug.diff10
2 files changed, 16 insertions, 2 deletions
diff --git a/net/freerdp/Makefile b/net/freerdp/Makefile
index b0b09c9e47cf..f532caae4a2a 100644
--- a/net/freerdp/Makefile
+++ b/net/freerdp/Makefile
@@ -39,8 +39,9 @@ CMAKE_OFF= WITH_DSP_EXPERIMENTAL WITH_GPROF WITH_GSTREAMER_0_10 WITH_IPP \
CMAKE_ARGS_aarch64+= -DWITH_NEON=ON
CFLAGS_aarch64+= -D__ARM_NEON__=__ARM_NEON # clang
-OPTIONS_DEFINE= ALSA CUPS FAAC FAAD FFMPEG GSM GSTREAMER ICU JPEG KERBEROS \
- LAME MANPAGES OPENH264 PCSC PULSEAUDIO SOXR WAYLAND X11
+OPTIONS_DEFINE= ALSA BROKENFOCUS CUPS FAAC FAAD FFMPEG GSM GSTREAMER \
+ ICU JPEG KERBEROS LAME MANPAGES OPENH264 PCSC \
+ PULSEAUDIO SOXR WAYLAND X11
OPTIONS_DEFAULT= CUPS GSTREAMER ICU KERBEROS MANPAGES SWSCALE WAYLAND X11
OPTIONS_RADIO= SCALE
OPTIONS_RADIO_SCALE= CAIRO SWSCALE
@@ -55,6 +56,9 @@ OPTIONS_DEFAULT_amd64= SSE
ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib
ALSA_CMAKE_BOOL= WITH_ALSA
+BROKENFOCUS_DESC= Work around focus bug in some WMs (PR \#254908)
+BROKENFOCUS_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-focusbug.diff
+
CAIRO_DESC= Use CAIRO image library for screen resizing
CAIRO_LIB_DEPENDS= libcairo.so:graphics/cairo
CAIRO_CMAKE_BOOL= WITH_CAIRO
diff --git a/net/freerdp/files/extra-patch-focusbug.diff b/net/freerdp/files/extra-patch-focusbug.diff
new file mode 100644
index 000000000000..39587df075a0
--- /dev/null
+++ b/net/freerdp/files/extra-patch-focusbug.diff
@@ -0,0 +1,10 @@
+--- client/X11/xf_keyboard.c.orig 2021-09-02 06:23:36 UTC
++++ client/X11/xf_keyboard.c
+@@ -183,7 +183,6 @@ void xf_keyboard_release_all_keypress(xfContext* xfc)
+ xfc->KeyboardState[keycode] = FALSE;
+ }
+ }
+- xf_sync_kbd_state(xfc);
+ }
+
+ BOOL xf_keyboard_key_pressed(xfContext* xfc, KeySym keysym)