! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Screen size change is not reflected in 'logical screen size'
Status:
RESOLVED: FIXED

Comments

Description Roel van de Kraats 2019-01-24 09:50:06 CET
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
Comment 1 Roel van de Kraats 2019-01-26 20:22:17 CET
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.
Comment 2 Git Bot editbugs 2019-04-16 21:21:02 CEST
Olivier Fourdan referenced this bugreport in commit 27aa2c7a6f978b2b4485b3241daa3580eb2edd63

screen: Remove logical size

https://git.xfce.org/xfce/xfwm4/commit?id=27aa2c7a6f978b2b4485b3241daa3580eb2edd63
Comment 3 Olivier Fourdan editbugs 2019-04-16 21:21:30 CEST
That should fix it.
Comment 4 Roel van de Kraats 2019-04-16 21:44:40 CEST
Yes, it does! Thanks a lot Olivier. I'm glad to get rid of my 'ugly workaround' and use this proper fix instead.
Comment 5 Jan Pazdziora 2019-05-21 12:47:53 CEST
For the record, the patch seems to have also fixed https://bugzilla.redhat.com/show_bug.cgi?id=1656444.

Bug #15085

Reported by:
Roel van de Kraats
Reported on: 2019-01-24
Last modified on: 2019-05-21

People

Assignee:
Olivier Fourdan
CC List:
2 users

Version

Version:
4.13.1

Attachments

ugly workaround (1.83 KB, patch)
2019-01-26 20:22 CET , Roel van de Kraats
no flags

Additional information