diff --git a/fixes_focus_steal.patch b/fixes_focus_steal.patch new file mode 100644 index 0000000..143834f --- /dev/null +++ b/fixes_focus_steal.patch @@ -0,0 +1,22 @@ +Index: a/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.cpp +=================================================================== +--- a/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.cpp (revision 131843) ++++ b/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.cpp +(working copy) +@@ -269,6 +269,14 @@ + * the keyboard before the target window sees the click. (GNOME Shell's hot corner has + * the same problem. At present we just let that problem be.) */ + ++ /* Make sure we really do still have the focus: */ ++ xcb_get_input_focus_cookie_t xcbFocusCookie = xcb_get_input_focus(QX11Info::connection()); ++ xcb_get_input_focus_reply_t *pFocusReply = xcb_get_input_focus_reply(QX11Info::connection(), xcbFocusCookie, 0); ++ xcb_window_t xcbFocusWindow = pFocusReply->focus; ++ free(pFocusReply); ++ if (xcbFocusWindow != m_windows[m_iKeyboardCaptureViewIndex]->winId()) ++ return true; ++ + /* Grab the mouse button. + * We do not check for failure as we do not currently implement a back-up plan. */ + /* If any previous grab is still in process, release it. */ + + diff --git a/fixes_for_SLE15.patch b/fixes_for_SLE15.patch index ef4f2f5..295a773 100644 --- a/fixes_for_SLE15.patch +++ b/fixes_for_SLE15.patch @@ -14,3 +14,21 @@ Index: VirtualBox-6.0.8/src/VBox/Additions/linux/drm/vbox_drv.c .fops = &vbox_fops, .irq_handler = vbox_irq_handler, +Index: VirtualBox-6.0.8/src/VBox/Additions/linux/drm/vbox_main.c +=================================================================== +--- VirtualBox-6.0.8.orig/src/VBox/Additions/linux/drm/vbox_main.c ++++ VirtualBox-6.0.8/src/VBox/Additions/linux/drm/vbox_main.c +@@ -600,13 +600,6 @@ int vbox_dumb_destroy(struct drm_file *f + } + #endif + +-#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 0) +-static void ttm_bo_put(struct ttm_buffer_object *bo) +-{ +- ttm_bo_unref(&bo); +-} +-#endif +- + void vbox_gem_free_object(struct drm_gem_object *obj) + { + struct vbox_bo *vbox_bo = gem_to_vbox_bo(obj); diff --git a/virtualbox.changes b/virtualbox.changes index 9de8dc3..5ae425c 100644 --- a/virtualbox.changes +++ b/virtualbox.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Sat Jul 6 17:06:28 UTC 2019 - Larry Finger + +- Correct the logic for SLE15_SP1. + +------------------------------------------------------------------- +Sat Jul 6 02:30:18 UTC 2019 - Larry Finger + +- Update the patch for SLE15 to handle the changes in SP1. + +------------------------------------------------------------------- +Sat Jul 6 02:24:37 UTC 2019 - Larry Finger + +- Fix Virtualbox for problem with stealing focus under Qt 5.13. File "fixes_focus_steal.patch" is added. + ------------------------------------------------------------------- Mon Jun 10 18:09:09 UTC 2019 - Larry Finger diff --git a/virtualbox.spec b/virtualbox.spec index 2576a9e..8f50e51 100644 --- a/virtualbox.spec +++ b/virtualbox.spec @@ -149,6 +149,8 @@ Patch131: fixes_for_qt5.13.patch Patch132: fixes_for_5.2.patch # Fixes for SLE15 Patch133: fixes_for_SLE15.patch +# Fixes for VB stealing focus under Qt 5.13 +Patch134: fixes_focus_steal.patch #endif Patch999: virtualbox-fix-ui-background-color.patch # @@ -453,8 +455,11 @@ as an "extpack" for VirtualBox. The implementation is licensed under GPL. %if 0%{?suse_version} > 1500 || (0%{?sle_version} >= 150100 && 0%{?is_opensuse}) %patch129 -p1 %else +%if (0%{?sle_version} == 150100) +# Patch only for SLE15.1 %patch133 -p1 %endif +%endif # Leap 42.3 adjustments %if 0%{?sle_version} == 120300 && 0%{?is_opensuse} %patch130 -p1 @@ -464,6 +469,7 @@ as an "extpack" for VirtualBox. The implementation is licensed under GPL. %patch131 -p1 %endif %patch132 -p1 +%patch134 -p1 # make VB UI background colors look sane again %patch999 -p1