marchaesen / vcxsrv

Windows X-server based on the xorg git sources (like xming or cygwin's xwin), but compiled with Visual Studio 2012 Community Edition.
GNU General Public License v3.0
358 stars 14 forks source link

Unwanted horizontal offset in multiwindow mode #13

Open shunkica opened 4 months ago

shunkica commented 4 months ago

In -multiwindow mode, applications launched with a 0,0 geometry are consistently offset by 8 pixels from the left screen edge.

This behavior has been verified on both Windows 10 and Windows Server 2022. For instance, initiating xterm -geometry +0+0 reproduces this issue.

On first open this error is produced in the log:

winMultiWindowWMProc - Error code: 8 (Match), ID: 0x00180000, Major opcode: 12 (ConfigureWindow), Minor opcode: 0 ((null))

On subsequent opens these errors are produced:

winMultiWindowWMProc - Error code: 3 (Window), ID: 0x00200022, Major opcode: 18 (ChangeProperty), Minor opcode: 0 ((null)) winMultiWindowWMProc - Error code: 3 (Window), ID: 0x00200022, Major opcode: 19 (DeleteProperty), Minor opcode: 0 ((null))

When running xterm -geometry +8+0 this error is not reproduced, but xterm -geometry +7+0 also reproduces the error.

shunkica commented 4 months ago

This seems like it could be related to Desktop flashing when maximizing window on second screen with Windows client and window flickers forever in multiwindow mode on Windows 10 because they both mention a 8 pixel offset.

That bug was apparently fixed in 1.19.6.4 but I am experiencing this behavior both in 1.19.6.4 and the latest version 21.1.10

The github user @sunweaver has mentioned a "8-pixel-off" phenomenon in https://github.com/ArcticaProject/nx-libs/issues/600#issuecomment-374131356 but I have not been able to find any additional context to this.

Also possibly related: GetWindowRect returns a size including "invisible" borders