wslg icon indicating copy to clipboard operation
wslg copied to clipboard

Borderless Maximized window does not fill the workspace.

Open cyraid opened this issue 1 year ago • 11 comments

Windows build number:

10.0.22621.1483

Your Distribution version:

22.04

Your WSL versions:

WSL version: 1.1.5.0 Kernel version: 5.15.90.1 WSLg version: 1.0.50 MSRDC version: 1.2.3770 Direct3D version: 1.608.2-61064218 DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp Windows version: 10.0.22621.1483

Steps to reproduce:

  1. Create window without decorations (borderless). This could be done using Chrome for example, without titlebar.
  2. Maximize said window, and it won't fill the workspace.

WSL logs:

pulseaudio.log weston.log stderr.log

WSL dumps:

No response

Expected behavior:

Listed in the "actual behaviour", shows what happens when you maximize a borderless (no decorations) window, vs a decorated window. It does not fill the workspace. The expected behaviour should not have a gap when maximized (and should not offset your clicks within the window by said offset).

Actual behavior:

Having a Maximized Window without decorations (borderless): BorderlessMaximized

Having a normal decorated Maximized Window (has decorations): WithBorderMaximized

Seems the window isn't being maximized to the workspace (the size of the desktop excluding the taskbar), and when you click in the window, everything is also offset by the amount shown (you must click up and left with that gap shown in the top left).

cyraid avatar Mar 24 '23 11:03 cyraid

I have the same problem, but something interesting, if I disable all but one monitor the problem goes away. It fails even with two identical sized monitors.

albatrossen avatar Apr 19 '23 06:04 albatrossen

Also for anyone finding this you can use [win]+[down] to recover your window, since it is not possible to use the title bar due to the mouse offset

albatrossen avatar Apr 19 '23 06:04 albatrossen

Since Intellij IDEA version 2023.2 EAP 6, the main window is rendered with a custom title bar under Linux as well. I experience the same behavior including the mouse offset when the window is maximized. The only workaround for me is to set the screen scale in Windows to 100%. Any other screen scale results in a mouse offset and a misaligned window.

simon-spinner avatar Jun 26 '23 20:06 simon-spinner

Since Intellij IDEA version 2023.2 EAP 6, the main window is rendered with a custom title bar under Linux as well. I experience the same behavior including the mouse offset when the window is maximized. The only workaround for me is to set the screen scale in Windows to 100%. Any other screen scale results in a mouse offset and a misaligned window.

I have the same problem with 100% scale on my Dell U2414H monitor.

zkyf avatar Jul 02 '23 05:07 zkyf

Looks similar to https://github.com/microsoft/wslg/issues/502 ?

paperclip avatar Aug 03 '23 08:08 paperclip

Currently I'm having the same problem with OpenLens, this seems to happen with every application that has native window decorations disabled.

paulius-valiunas avatar Jan 30 '24 15:01 paulius-valiunas

This happens for me with both VSCode and any borderless programs I've written for myself.

As previously said, it seems to be related to using multiple monitors. If I set the "Multiple displays" option in the Windows settings to anything but "Extend these displays" (So "Duplicate these displays" or "Only show on xy") , it works as expected without any strange offset to the borderless windows.

Edit: This only seems to happen with X11 applications. Wayland applications work fine.

Klemmbaustein avatar Mar 30 '24 20:03 Klemmbaustein

i'm currently having the same issue and i can confirm that happens only when i connect multiple monitors and only when i try to use the application with full screen size. Example: image

  1. my mouse position
  2. element selected by mouse

pricelessrabbit avatar May 06 '24 12:05 pricelessrabbit

@pricelessrabbit might be related to the use of windows power toys fancy zone https://github.com/microsoft/PowerToys/issues/15986

amoskueez avatar Jul 04 '24 17:07 amoskueez

From the description on https://github.com/microsoft/PowerToys/issues/15986 is sounds nothing like the symptoms of this issue. The windows are responsive. The window position is just off by around 20 pixels in both x and y. Besides I just checked again, and can say it's still a problem and I do not have powertoys installed and I can still reproduce the issue.

albatrossen avatar Jul 04 '24 21:07 albatrossen

Same here. Two screens with the same resolution and "Extend these displays" option. Bordered windows has the same problem sometimes, but a restore, resize and then maximize again fixes the problem.

The solution does not work with borderless windows. It always has this kind of padding.

mleandrojr avatar Jul 10 '24 21:07 mleandrojr