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

wayland: reimplement maximize and restore #6383

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

devmatteini
Copy link

Hi!

Reimplement maximize and restore features for wayland.
It was removed with wayland reimplementation in #4777. I backported maximize and restore as before that PR was merged.

It partially fixes #6203, but I didn't check toggle_fullscreen behavior.

The only issue that I noticed is that sometimes after you invoke win:restore() wezterm window doesn't restore until you focus another application.

Configuration file for tests:

local wezterm = require "wezterm"

local config = {}

wezterm.on("gui-startup", function()
  local mux = wezterm.mux
  local tab, main_pane, main_window = mux.spawn_window {}
  main_window:gui_window():maximize()
end)

config.keys = {
  {
    key = "r",
    mods = "CTRL|SHIFT",
    action = wezterm.action_callback(function(win, pane)
      wezterm.log_info 'Restore window'
      win:restore()
    end),
  },
  {
    key = "m",
    mods = "CTRL|SHIFT",
    action = wezterm.action_callback(function(win, pane)
      wezterm.log_info 'Maximize window'
      win:maximize()
    end),
  },
}

return config

Tested on Ubuntu 24.04.1 with GNOME 46.

It was removed with wayland reimplementation in wez#4777
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Maximize is not working and fullscreen is not fullscreen
1 participant