From downstream bug report https://bugzilla.redhat.com/show_bug.cgi?id=1666735 Description of problem: Running Fedora 29 xfce + xfwm4 in VMware Workstation. A change of the VM screen size is handled properly by most components, except that 'maximizing' a window changes the window size to the previous screen size. This didn't happen before upgrading from F27 to F29. xfwm4 complains twice with this warning when the VM screen size is changed: (xfwm4:55331): xfwm4-WARNING **: 14:31:44.773: output size (1902x1045) and logical screen size (1920x1200) do not match Changing the screen size again shows that the logical screen size was in the end updated after all: (xfwm4:55331): xfwm4-WARNING **: 14:31:50.728: output size (1837x987) and logical screen size (1902x1045) do not match Adding some debug output reveals that the monitors_changed_cb() and the size_changed_cb() event handlers both call myScreenComputeSize(), which leads to the warning being show twice. It looks like WidthOfScreen() and HeightOfScreen() as called from myScreenComputeSize() still give the old values at the moment of handling the events. Perhaps the order in which Xlib (which I believe provides these functions) and gdk/gtk are updated is notified of a screen size change may not be depended on? Version-Release number of selected component (if applicable): Fedora 29 xfwm4 4.13.1 VMware Workstation 12.5.9 MS Windows 10 How reproducible: Easily on my set-up... Steps to Reproduce: 1. Run xfce in a VMware Workstation VM 2. Change the VM screen size (by resizing the window in which it is running) 3. Maximize a window handled by xfwm Actual results: Window is not full screen Expected results: Window is full screen
Created attachment 8265 ugly workaround I'm currently using an ugly workaround (see attachment 'uglyhack.patch') where myScreenComputeSize() is called from handleConfigureNotify(), which is called quite regularly. It is called quickly after size_changed_cb(), but with up-to-date values for WidthOfScreen() and HeightOfScreen(). This way, at least the internal logical screen size state is updated, which allows for (manual) re-maximizing a window.
Olivier Fourdan referenced this bugreport in commit 27aa2c7a6f978b2b4485b3241daa3580eb2edd63 screen: Remove logical size https://git.xfce.org/xfce/xfwm4/commit?id=27aa2c7a6f978b2b4485b3241daa3580eb2edd63
That should fix it.
Yes, it does! Thanks a lot Olivier. I'm glad to get rid of my 'ugly workaround' and use this proper fix instead.
For the record, the patch seems to have also fixed https://bugzilla.redhat.com/show_bug.cgi?id=1656444.