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

Moving a WezTerm window between monitors causes erratic jumping and resizing of the window #1983

Open
lsorber opened this issue May 13, 2022 · 8 comments
Labels
bug Something isn't working

Comments

@lsorber
Copy link

lsorber commented May 13, 2022

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

macOS

WezTerm version

20220512-142730-97f0bd16

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

I have noticed several distinct issues related to how the WezTerm window is rendered.

On an external monitor on macOS:

  1. The window padding (set at a fixed 40px) is clearly larger on the external monitor compared to my laptop's display.
  2. Moving the WezTerm window around with the mouse by dragging the tab bar causes the window to jump around.
  3. Moving the WezTerm window close to the virtual boundary between my external monitor and laptop's display causes erratic resizing behaviour.

None of these issues occur on my MacBook Pro's display.

Video demonstrating these issues:

wezterm_glitch_4k.mp4

To Reproduce

  1. Open a WezTerm window
  2. Move the WezTerm window to an external monitor to observe issue (1)
  3. Drag the WezTerm window around on the external monitor to observe issue (2)
  4. Drag the WezTerm window to near the virtual boundary between the external monitor and the internal display to observe issue (3)

Configuration

local dracula = require 'dracula'; -- https://github.com/dracula/wezterm
local wezterm = require 'wezterm';

return {
  colors = dracula,
  font = wezterm.font("FiraCode Nerd Font", {weight="Medium"}),
  font_size = 16.0,
  initial_cols = 80,
  initial_rows = 24,
  show_tab_index_in_tab_bar = false,
  window_decorations = "RESIZE",
  window_frame = {
    font_size = 16.0,
    active_titlebar_bg = "#282a36",
    inactive_titlebar_bg = "#282a36",
  },
  window_padding = {
    left = "40px",
    right = "40px",
    top = "40px",
    bottom = "40px",
  },
  keys = {
    { key="LeftArrow",  mods="OPT", action=wezterm.action{SendString="\x1b\x62"} },
    { key="RightArrow", mods="OPT", action=wezterm.action{SendString="\x1b\x66"} },
    { key="LeftArrow",  mods="CMD", action=wezterm.action{SendString="\x01"} },
    { key="RightArrow", mods="CMD", action=wezterm.action{SendString="\x05"} },
    { key="z",          mods="CMD", action=wezterm.action{SendString="\x1f"} },
  },
}

Expected Behavior

  1. That the window padding is the same size independent of the display or DPI
  2. That the window doesn't jump around when dragging the window
  3. That the window doesn't resize when dragging the window

Logs

I don't see any logs being generated when reproducing this issue.

Anything else?

No response

@lsorber lsorber added the bug Something isn't working label May 13, 2022
@cgraff
Copy link

cgraff commented May 18, 2023

Hello and good evening!

I can reproduce the issue easily (independently of internal / external monitor) on my MacBook Pro Display just by hiding the window decorations by setting the following config property:

config.window_decorations = 'RESIZE'

WezTerm Version

My current version is: wezterm 20230408-112425-69ae8472

MacOS Version

Ventura 13.3.1(a) (Apple Silicon)

@wez
Copy link
Owner

wez commented May 19, 2023

@cgraff please open a separate issue; this one is specific to having multiple monitors

@wez wez changed the title Moving a WezTerm window causes erratic jumping and resizing of the window Moving a WezTerm window between monitors causes erratic jumping and resizing of the window May 19, 2023
@cgraff
Copy link

cgraff commented May 22, 2023

Hi @wez thanks for the hint. I think the problem went away after updating my Mac to MacOS 13.4. Cannot reproduce it anymore :-)

@thiagodiniz
Copy link

I have the same problem using with windows 11

@mikkelam
Copy link

I can confirm this as a problem on my 2560 x 1440 monitor. Changing resolution to half 1280 x 720 seems to resolve the issue (but other scale factors have similar issue for me)

@PiotrNawrot
Copy link

This is still an issue for me as well!

@nbelakovski-mssm
Copy link

I have this same problem, but I noticed that if I click and drag using the tab title, there's no jump. I opened up some more tabs and confirmed that clicking on any tab and dragging works as expected (it also selects that tab which is understandable). I tried clicking and dragging on the area without tabs while multiple tabs were open, in the hopes that maybe just having a second open tab could be a workaround, but it still jumps.

@gmckeown
Copy link

gmckeown commented Feb 3, 2025

Also seeing this issue with WezTerm-20240203-110809-5046fc22 on Windows 11. I have different resolutions and scaling factors across three screens:

Left (3840x2160 at 200%) - Middle (1920x1200 at 125%) - Right (3840x2160 at 150%)

If I move the WezTerm window between the left and middle screens (either direction) it jitters around and resizes itself. If I move it between the middle and right screens, it works just fine. I did try setting the right screen to 200% scaling and it still works OK so I'm not sure what the difference is in moving to the left screen compared to the right screen!

As mentioned by @nbelakovski-mssm if I move using the tab bar instead of the title bar, the window moves without issue.

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

No branches or pull requests

8 participants