Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dragging window between monitors on macos is glitchy/laggy #3396

Open
Kurt-Shiwz opened this issue Mar 29, 2023 · 5 comments
Open

dragging window between monitors on macos is glitchy/laggy #3396

Kurt-Shiwz opened this issue Mar 29, 2023 · 5 comments
Labels
bug Something isn't working macOS Issue applies to Apple macOS

Comments

@Kurt-Shiwz
Copy link

What Operating System(s) are you seeing this problem on?

macOS

Which Wayland compositor or X11 Window manager(s) are you using?

No response

WezTerm version

20230326-111934-3666303c

Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?

Yes, and I updated the version box above to show the version of the nightly that I tried

Describe the bug

just use moust move wezterm window between insid-display and Dell display

20230328-162910.mp4

To Reproduce

No response

Configuration

default config

Expected Behavior

No response

Logs

No response

Anything else?

No response

@Kurt-Shiwz Kurt-Shiwz added the bug Something isn't working label Mar 29, 2023
@wez wez changed the title mouse drift dragging window across monitors on macos is glitchy/laggy Mar 29, 2023
@wez wez changed the title dragging window across monitors on macos is glitchy/laggy dragging window between monitors on macos is glitchy/laggy Mar 29, 2023
@wez wez added the macOS Issue applies to Apple macOS label Mar 29, 2023
@wez
Copy link
Owner

wez commented Mar 29, 2023

This is likely due to the difference in DPI between the monitors. Part-way through the drag, the geometry of the window changes to match the new screen, which interferes with the drag operation.

@snobb
Copy link

snobb commented Aug 1, 2023

I've got the same issue on MacOS. Somehow kitty has a solution to that and it works pretty solid. I've done a super ugly workaround which makes window jumpy when you move it between screens (I normally use Rectangle for window operations) but that assumes that the term is always maximised like in my case:

-- ugly workaround for resizing windows when moved between screens.
wezterm.on('window-resized', function(window, pane)
  window:maximize()
end)

Wonder if there is is a way to do it more gracefully. Purely speculating here - have no idea how the GUI works really. Perhaps some pseudo logic like:

if
  window:status == maximised and
  (screen.w != windows.w + padding or
   screen.h != window.h + padding)
then
  window:maximise()
end

Wondering how kitty does it?

This issue and inability to select topmost line because it starts dragging regardless are 2 things that keep me bouncing between kitty and wezterm.
I have config.window_decorations = 'RESIZE' and no tab_bar. But seems like even though the tab_bar is not there, it assumes that it is and starts dragging, when you try selecting the topmost line. Should probably open a separate bug for this.

PS. Thanks for your work on this by the way and keep it up!

@snobb
Copy link

snobb commented Aug 15, 2023

Hmm... just tried again and it was fixed somehow - the window stays maximised when moved between screens with different resolutions.

@scoates
Copy link

scoates commented Oct 17, 2023

FWIW, this happens to me, but indeed it does only seem to happen when the DPI changes. I have two "big" monitors with the same DPI and I haven't been able to get it to happen when dragging between these two, but it does happen when dragging from a big monitor to the small one (scrollback gets messed up, scroll position is wrong; seems some history is even lost sometimes).

"big" is my two LG monitors; "small" is the built-in Color LCD in the following (not sure where to get the effective DPI/resolution numbers, but I can pull them up if you know where and want them):

Apple M2 Max:

  Chipset Model:	Apple M2 Max
  Type:	GPU
  Bus:	Built-In
  Total Number of Cores:	30
  Vendor:	Apple (0x106b)
  Metal Support:	Metal 3
  Displays:
LG SDQHD:
  Resolution:	2560 x 2880
  UI Looks like:	2560 x 2880 @ 60.00Hz
  Main Display:	Yes
  Mirror:	Off
  Online:	Yes
  Rotation:	Supported
Color LCD:
  Display Type:	Built-in Liquid Retina XDR Display
  Resolution:	3024 x 1964 Retina
  Mirror:	Off
  Online:	Yes
  Automatically Adjust Brightness:	Yes
  Connection Type:	Internal
LG SDQHD:
  Resolution:	2560 x 2880
  UI Looks like:	2560 x 2880 @ 60.00Hz
  Mirror:	Off
  Online:	Yes
  Rotation:	Supported

@snobb
Copy link

snobb commented Oct 17, 2023

Hmm... just tried again and it was fixed somehow - the window stays maximised when moved between screens with different resolutions.

Never mind - the issue is still there. Not sure why it could not be reproduced at that moment, but after a while the issue is back and can be reproduced consistently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working macOS Issue applies to Apple macOS
Projects
None yet
Development

No branches or pull requests

4 participants