Giter Club home page Giter Club logo

Comments (5)

kovidgoyal avatar kovidgoyal commented on May 28, 2024 1

This is a bug in shpool it is not setting the full window size struct
(the latter two pixel size fields to be precise) to the kernel via
TIOCWINSZ for tty's it creates.

That said, I will fix the kitten to at least not panic, though mouse
interactions will not work.

from kitty.

willangley avatar willangley commented on May 28, 2024

Thank you for the prompt investigation and fix, @kovidgoyal!

from kitty.

ethanpailes avatar ethanpailes commented on May 28, 2024

+1 about the quick diagnosis @kovidgoyal!

I'm the shpool maintainer and I've started looking into fixing this. It is pretty easy to just forward the xpixel and ypixel fields along side the rows and column fields, but one weird thing is that I notice that man ioctl_tty on my system claims that the fields are unused. In particular, here is the relevant bit of the man page

   Get and set window size
       Window sizes are kept in the kernel, but not used by the kernel (except in the case of virtual consoles, where the  kernel  will  update
       the window size when the size of the virtual console changes, for example, by loading a new font).

       TIOCGWINSZ
              Argument: struct winsize *argp

              Get window size.

       TIOCSWINSZ
              Argument: const struct winsize *argp

              Set window size.

       The struct used by these ioctls is defined as

           struct winsize {
               unsigned short ws_row;
               unsigned short ws_col;
               unsigned short ws_xpixel;   /* unused */
               unsigned short ws_ypixel;   /* unused */
           };

       When the window size changes, a SIGWINCH signal is sent to the foreground process group.

are those /* unused */ comments just mistaken? I think this is why I elided these fields in the first place.

from kitty.

kovidgoyal avatar kovidgoyal commented on May 28, 2024

yes, they are mistaken. These days many terminals fill them in,
including the venerable xterm. And they are used by terminal programs
that need pixel sizes for example to display graphics or have pixel
precision mouse handling.

from kitty.

ethanpailes avatar ethanpailes commented on May 28, 2024

Ok good to know. Thanks! Shpool will now forward the pixel widths correctly so it should play nice with kitty.

from kitty.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.