Opened 6 years ago
Last modified 6 years ago
#18042 new defect
[X11] Virtual machine window WM_NAME name and class being set too late
Reported by: | Will B | Owned by: | |
---|---|---|---|
Component: | GUI | Version: | VirtualBox 5.2.18 |
Keywords: | WM_CLASS, window class, Linux | Cc: | |
Guest type: | all | Host type: | Linux |
Description
Under X11 VirtualBox sets the virtual machine window's WM_NAME name and class too late, interfering with window manager rules. "Too late" meaning that the virtual machine window has been displayed and handled by the window manager, *then* the WM_NAME name and class is set.
The virtual machine window class was being set correctly with VirtualBox 5.2.6, however all versions thereafter have not worked correctly.
After looking at the code in src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp void UIMachineWindow::prepare()
it appears the X11 window class-setting code was moved in 5.2.8 from the beginning of the prepare()
function to the end. This appears to be the root cause of this issue.
The consequence of this issue is that X11 window managers that check the WM_NAME for position, sizing or border rules won't recognize that the window is a VirtualBox Machine. Window manager rules don't work properly for VirtualBox VMs. It's possible some more complex window managers might actively monitor the WM_NAME for changes, but most simpler window managers do not.