File javier_fixes.diff of Package virtualbox

===================================================================
# This fixes the issue where VirtualBox confuses the direction of the (rare) PS/2 horizontal scroll wheel
# See https://github.com/joncampbell123/dosbox-x/issues/1271#issuecomment-2330285837
# Note it breaks Linux using PS/2 mouse who makes the same mistake...
Index: VirtualBox-7.2.0/src/VBox/Devices/Input/DevPS2M.cpp
===================================================================
--- VirtualBox-7.2.0.orig/src/VBox/Devices/Input/DevPS2M.cpp
+++ VirtualBox-7.2.0/src/VBox/Devices/Input/DevPS2M.cpp
@@ -836,7 +836,7 @@ static int ps2mR3PutEventWorker(PPDMDEVI
     pThis->iAccumX += dx;
     pThis->iAccumY += dy;
     pThis->iAccumZ += dz;
-    pThis->iAccumW += dw;
+    pThis->iAccumW -= dw;
     pThis->fCurrB   = fButtons & (PS2M_STD_BTN_MASK | PS2M_IMEX_BTN_MASK);
     pThis->fAccumB |= pThis->fCurrB;
 
===================================================================
# WA for the issue where the VM windows keep moving around for no good reason under kwin
# See https://www.virtualbox.org/ticket/22001
Index: VirtualBox-7.2.0/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.cpp
===================================================================
--- VirtualBox-7.2.0.orig/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.cpp
+++ VirtualBox-7.2.0/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.cpp
@@ -728,7 +728,7 @@ void UIDesktopWidgetWatchdog::restoreWid
 void UIDesktopWidgetWatchdog::setTopLevelGeometry(QWidget *pWidget, int x, int y, int w, int h)
 {
     AssertPtrReturnVoid(pWidget);
-#ifdef VBOX_WS_NIX
+#ifdef NO_NEED_FOR_THIS_HAX
 # define QWINDOWSIZE_MAX ((1<<24)-1)
     if (pWidget->isWindow() && pWidget->isVisible() && NativeWindowSubsystem::displayServerType() == VBGHDISPLAYSERVERTYPE_X11)
     {
===================================================================
# WA for the issue where virtualbox grabs the pointer and never releases it
# Seems to affect both X11 and Xwayland but is more noticealbe under Xwayland
# Underlying cause is like race condition between focus/click/timer events
# which results in the pointer grab becoming active _after_ the native event
# filter is deleted so we miss the events.
#  WA is to just keep the native event filter forever ...
Index: VirtualBox-7.2.0/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
===================================================================
--- VirtualBox-7.2.0.orig/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
+++ VirtualBox-7.2.0/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
@@ -1996,6 +1996,7 @@ void UIMachineView::focusInEvent(QFocusE
 
 void UIMachineView::focusOutEvent(QFocusEvent *pEvent)
 {
+#if 0
     /* If native event filter exists: */
     if (m_pNativeEventFilter)
     {
@@ -2004,6 +2005,7 @@ void UIMachineView::focusOutEvent(QFocus
         delete m_pNativeEventFilter;
         m_pNativeEventFilter = 0;
     }
+#endif
 
     /* Call to base-class: */
     QAbstractScrollArea::focusOutEvent(pEvent);
openSUSE Build Service is sponsored by