wez / wezterm

A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
https://wezfurlong.org/wezterm/
Other
17.3k stars 781 forks source link

initial_cols / initial_rows combination maximizes window #5822

Closed gtirloni closed 2 months ago

gtirloni commented 3 months ago

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

Linux X11

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

gnome-shell 46.3.1 mutter 46.3.1

WezTerm version

20240715_080945_c9116830

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

When started without initial_cols / initial_rows, wezterm starts fine with the default window size.

Changing the values to be exactly like this causes the window to start maximized:

config.initial_cols = 203
config.initial_rows = 58

It's weird that keeping the sum the same has no effect (e.g. 202 x 59). It has to be those exact values in my monitor (2560x2880 resolution).

To Reproduce

In my setup, add this to .wezterm.lua:

config.initial_cols = 203
config.initial_rows = 58

Start wezterm with: wezterm start --cwd . --always-new-process

Configuration

local wezterm = require 'wezterm'
local config = wezterm.config_builder()

-- broken
config.enable_wayland = false;
--config.window_decorations = "INTEGRATED_BUTTONS|TITLE|RESIZE"

config.initial_cols = 203
config.initial_rows = 58
config.color_scheme = 'Thayer Bright (Gogh)'

config.font = wezterm.font 'JetBrainsMono Nerd Font'
config.font_size = 13
config.harfbuzz_features = {"calt=0", "clig=0", "liga=0"} -- disable ligatures

config.enable_scroll_bar = true
config.enable_tab_bar = false
config.default_cursor_style = 'BlinkingUnderline'
config.cursor_blink_rate = 450
config.cursor_blink_ease_in = 'Constant'
config.cursor_blink_ease_out = 'Constant'

config.keys = {
  {
    key = 'n',
    mods = 'CTRL|SHIFT',
    action = wezterm.action.SpawnWindow,
  },
  {
    key = 'd',
    mods = 'CTRL|ALT',
    action = wezterm.action.SplitVertical { domain = 'CurrentPaneDomain' },
  },
  {
    key = 'r',
    mods = 'CTRL|ALT',
    action = wezterm.action.SplitHorizontal { domain = 'CurrentPaneDomain' },
  },
  {
    key = 'LeftArrow',
    mods = 'ALT',
    action = wezterm.action.ActivatePaneDirection 'Left',
  },
  {
    key = 'RightArrow',
    mods = 'ALT',
    action = wezterm.action.ActivatePaneDirection 'Right',
  },
  {
    key = 'UpArrow',
    mods = 'ALT',
    action = wezterm.action.ActivatePaneDirection 'Up',
  },
  {
    key = 'DownArrow',
    mods = 'ALT',
    action = wezterm.action.ActivatePaneDirection 'Down',
  },
}

return config

Expected Behavior

Window is started with the specified size, not maximized.

Logs

Nothing record in logs.

Anything else?

This started happening 2-3 days ago. I've always used the nightly builds and update semi-daily.

wez commented 2 months ago

It's most likely your window manager doing this.

gtirloni commented 2 months ago

@wez I agree. I couldn't find any other app suffering from this and thought it was wezterm but by chance I noticed it with a text editor. Sorry for the noise.

github-actions[bot] commented 1 month ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.