Fiwix icon indicating copy to clipboard operation
Fiwix copied to clipboard

Add required features to port a basic windowing system

Open mikaku opened this issue 6 months ago • 17 comments

Now that Fiwix has UNIX sockets I'd like to explore the path to add support for a light windowing system like Microwindows or Nano-X. Some comments from @ghaerr in #78 will help a lot to summarize the features needed to port his amazing Microwindows system, which is simple enough to run with UNIX sockets. Other bloated windowing systems like X11 might require a TCP/IP stack which the kernel lacks at the moment.

So, I've created this issue to help to track all the features that @ghaerr summarized:

  • [x] Add Microwindows to FiwixOS distribution (@ghaerr already added support for Fiwix in https://github.com/ghaerr/microwindows/commit/606bfb0dde0a243de6519e9ae16f4ee550dedbe7).
  • [x] Add FreeType 2.10.4 to FiwixOS distribution; this allows for much better font support.
  • [x] The kernel doesn't remove the fbcon cursor when calling ioctl(ttyfd, KDSETMODE, KD_GRAPHICS). Calling ioctl(ttyfd, KDSETMODE, KD_TEXT) may want to restore the fbcon text console buffer (https://github.com/mikaku/Fiwix/commit/d9eca918c218db9b90dd9335b0a7e912801b0919).
  • [x] Add PS/2 mouse driver (/dev/mouse -> /dev/psaux). Meanwhile and for testing under QEMU, use the following line: -chardev msmouse,id=chardev1 -device isa-serial,chardev=chardev1,id=serial1.
  • [ ] Configure Microwindows to create the nano-X server (LINK_APP_INTO_SERVER = N), to allow multiple simultaneous connections (clients), like X11, and also avoid linking the entire nano-X server into each executable. @ghaerr said "IIRC there was still a bug where on occasion the client and server would get de-synced. This would be a good time to play with that and see if you can duplicate the problem and fix it in Fiwix."
  • [ ] Update fb driver to return Linux-compatible framebuffer ioctl formats.
    • [ ] Need C library header to put new framebuffer ioctls - IO_FB_ADDR, IO_FB_XRES, IO_FB_YRES.
    • [ ] Add ioctl to fb driver to map framebuffer address to process and return virtual address.
    • [ ] Add ioctls to return width, height, format and stride of framebuffer.
  • [ ] Add UNIX98 PTY (pseudoterminals) support to allow terminal emulators to work.
  • [ ] Configure Microwindows to also use SVGAlib.
  • [ ] Implement /dev/tty keyboard in raw mode (no scan codes).
  • [ ] Add /dev/tty scan code support to Fiwix kbd driver (?).
  • [ ] Bonus: Port Xorg SVGA and framebuffer versions.

mikaku avatar Aug 24 '24 10:08 mikaku