[vbox-dev] minitoolbar regression/issue of virtualbox-qt on xfce4 [PATCH]

Gianfranco Costamagna locutusofborg at debian.org
Thu Jan 4 08:16:51 GMT 2018

Hello Dusan, I'm forwarding to vbox-dev list,

I had an issue with virtualbox-qt since some version after 5.1.18 (5.1.18was the latest version I was using without that issue).  The issue was that
when virtual machine is set to fullscreen, minitoolbar was missing/hidden
even that minitoolbar was set to be shown (no matter if on top or bottom of
the screen).

I've tried to google the issue and found few similar tickets/discussions on
the net, but most of them has answers that it is caused by wrong version of
qt and so on.  So I thought it is maybe just my configuration and that it
will be somehow solved after some library gets update or so (I'm using
debian testing so I might have some old version of library left on the

But then when after months I've found ticket
https://www.virtualbox.org/ticket/17280 , I thought 'hey someone else has
exactly the same issue, maybe it is not just my configuration'.

So I've tried several versions of vbox from 5.2.2 back to 5.1.18 and I've
found that the issue started to appear right in 5.1.20.  So I've downloaded
the (debian) sources of 5.1.18 and 5.1.20 and compared them to try to find
the code which might be the cause of the issue.

And so I've found that there was change in logic of function

In 5.1.18 was (for fullscreen) the default return value Qt::Tool |
Qt::FramelessWindowHint with the only exception for X11WMType_Compiz for
which was returned Qt::Window | Qt::FramelessWindowHint.

But in 5.1.20 it was changed and the default return value was Qt::Window |
Qt::FramelessWindowHint with the exception for X11WMType_GNOMEShell,
X11WMType_Metacity and X11WMType_Mutter WMs for which the return value was
Qt::Tool | Qt::FramelessWindowHint.

So, for X11WMType_Compiz, X11WMType_GNOMEShell, X11WMType_Mutter and
X11WMType_Metacity (which was new in 5.1.20) WMs the return value in 5.1.18
and in 5.1.20 was the same, but not for X11WMType_KWin and X11WMType_Xfwm4
(which is exactly what I'm using as I'm using xfce4).

And so I've added X11WMType_Xfwm4 to the "switch" to return the same value
as in 5.1.18 and compiled virtualbox-qt myself and the issue was gone (I've
done it on 5.2.2 which was actual in testing at that time).

The diff is:

--- virtualbox-5.2.2-dfsg/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp~  2017-11-23 10:21:43.000000000 +0100
+++ virtualbox-5.2.2-dfsg/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp   2017-12-18 03:42:49.719028477 +0100
@@ -413,6 +413,7 @@
         case X11WMType_KWin:
         case X11WMType_Metacity:
         case X11WMType_Mutter:
+        case X11WMType_Xfwm4:
             return geometryType == GeometryType_Full ?
                    Qt::Tool | Qt::FramelessWindowHint :
                    Qt::Window | Qt::FramelessWindowHint;

Can you please look at this issue and test it (vbox 5.2.2+, xfce4, VM with
fullscreen and minitoolbar)? And if you can replicate the issue using debian
package and if the diff will solve it, can you please consider to use the
diff for fixing the issue for next versions of vbox?



More information about the vbox-dev mailing list