Skip to content

move_to_screen_edge performs unnecessary resize #8222

@k4lizen

Description

@k4lizen

Describe the bug
The move_to_screen_edge layout action sometimes performs an unnecessary resize.

To Reproduce
Run kitty --config NONE -o "allow_remote_control yes" -o "enabled_layouts splits"
In the spawned kitty run: kitten @ launch --location=hsplit --bias=20
In the same window as the first command (the top window) run: kitten @ action layout_action move_to_screen_edge top

The window will be resized.

Screenshots

Image
Image

Environment details

kitty 0.38.1 created by Kovid Goyal
Linux top 6.12.8-artix1-1
                   '
                  'o'
                 'ooo'
                'ooxoo'
               'ooxxxoo'
              'oookkxxoo'
             'oiioxkkxxoo'
            ':;:iiiioxxxoo'
               `'.;::ioxxoo'
          '-.      `':;jiooo'
         'oooio-..     `'i:io'
        'ooooxxxxoio:,.   `'-;'
       'ooooxxxxxkkxoooIi:-.  `'
      'ooooxxxxxkkkkxoiiiiiji'
     'ooooxxxxxkxxoiiii:'`     .i'
    'ooooxxxxxoi:::'`       .;ioxo'
   'ooooxooi::'`         .:iiixkxxo'
  'ooooi:'`                `'';ioxxo'
 'i:'`                          '':io'
'`                                   `'
root@top 
-------- 
OS: Artix Linux x86_64 
Host: B365MHC 
Kernel: 6.10.3-artix1-2 
Uptime: 5 secs 
Packages: 1418 (pacman) 
Shell: fish 3.7.1 
Resolution: 1920x1080 
Terminal: rclocal 
CPU: Intel i3-9100F (4) @ 4.200GHz 
GPU: AMD ATI Radeon RX 470/480/570/570X/580/580X/590 
Memory: 298MiB / 15957MiB 

                        
                        





�[?25h�[?7hDISTRIB_ID="Artix"
DISTRIB_RELEASE="rolling"
DISTRIB_DESCRIPTION="Artix Linux"
Running under: X11
OpenGL: '4.6 (Core Profile) Mesa 24.3.3-arch1.1' Detected version: 4.6
Frozen: False
Fonts:
  medium: NotoSansMono-Regular: /usr/share/fonts/noto/NotoSansMono-Regular.ttf:0
          Features: ()
    bold: NotoSansMono-Bold: /usr/share/fonts/noto/NotoSansMono-Bold.ttf:0
          Features: ()
  italic: NotoSansMono-Regular: /usr/share/fonts/noto/NotoSansMono-Regular.ttf:0
          Features: ()
      bi: NotoSansMono-Bold: /usr/share/fonts/noto/NotoSansMono-Bold.ttf:0
          Features: ()
Paths:
  kitty: /usr/bin/kitty
  base dir: /usr/lib/kitty
  extensions dir: /usr/lib/kitty/kitty
  system shell: /usr/bin/fish
System color scheme: no_preference. Applied color theme type: none
Loaded config overrides:
  allow_remote_control yes
  enabled_layouts splits

Config options different from defaults:
allow_remote_control yes
enabled_layouts      ['splits']

Important environment variables seen by the kitty process:
	PATH                                ~/.cabal/bin:~/.ghcup/bin:~/.local/share/go/bin:~/.local/bin:~/bin:~/.cabal/bin:~/.ghcup/bin:~/.cabal/bin:~/.ghcup/bin:~/.cargo/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/lib/rustup/bin
	LANG                                en_US.UTF-8
	EDITOR                              hx
	SHELL                               /usr/bin/fish
	DISPLAY                             :0.0
	USER                                someuser
	XDG_MENU_PREFIX                     xfce-
	LC_PAPER                            en_US.UTF-8
	XDG_SEAT_PATH                       /org/freedesktop/DisplayManager/Seat0
	LC_TIME                             en_US.UTF-8
	XDG_CACHE_HOME                      ~/.cache
	XDG_SESSION_ID                      1
	XDG_CONFIG_DIRS                     /etc/xdg
	XDG_SESSION_PATH                    /org/freedesktop/DisplayManager/Session0
	XDG_VTNR                            7
	LC_NUMERIC                          en_US.UTF-8
	XDG_SEAT                            seat0
	XDG_RUNTIME_DIR                     /run/user/1000
	LC_MEASUREMENT                      en_US.UTF-8
	LC_TELEPHONE                        en_US.UTF-8
	LC_ADDRESS                          en_US.UTF-8
	LC_IDENTIFICATION                   en_US.UTF-8
	XDG_SESSION_CLASS                   user
	XDG_CURRENT_DESKTOP                 XFCE
	LC_NAME                             en_US.UTF-8
	XDG_DATA_DIRS                       /usr/local/share:/usr/share
	XDG_GREETER_DATA_DIR                /var/lib/lightdm-data/someuser
	XDG_SESSION_TYPE                    x11
	XDG_CONFIG_HOME                     ~/.config
	XDG_SESSION_DESKTOP                 xfce
	LC_MONETARY                         en_US.UTF-8

Additional context
I was writing a script which uses move_to_screen_edge where I want to retain the size of the window being moved if possible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions