atlas-engineer / nyxt

Nyxt - the hacker's browser.
https://nyxt-browser.com/
9.83k stars 411 forks source link

Reimplement multi window logic #3510

Open aadcg opened 1 month ago

aadcg commented 1 month ago

As per the API of version 3, multi window support is broken by design. The root of the issue is that the same buffer can't be shown in multiple windows. There is no indication that WebKitGTK doesn't allow it, so it is unclear why this isn't implemented.

Find below 3 perspectives on the manifestation of the issue:

  1. Start Nyxt and call (ffi-window-set-buffer (window-make *browser*) (current-buffer)). Note that the new window is blank.
  2. What happens if the window count surpasses the buffer count?
  3. Take Nyxt with a single window and two buffers. Then create a window and call switch-buffer. Note that this results in swapping buffers across the windows. From a UI's perspective, this behavior is unsettling at best (not to mention that the window title is not properly handled).

https://github.com/user-attachments/assets/42c7f329-f177-4669-80c4-492b5dd21539


For version 4, the root of the issue must be addressed for the WebKitGTK port.

Additionally, ffi-window-set-buffer should handle slots active-buffer, last-access and hook window-set-buffer-hook. It should be possible to drop window-set-buffer and rely exclusively on ffi-window-set-buffer-hook.

aadcg commented 1 month ago

The core issue must still be solved, but something tells me that there are other issues regarding multi window support.

Regardless, this will become a priority later.

aadcg commented 1 month ago

something tells me that there are other issues regarding multi window support

drawing

https://github.com/atlas-engineer/nyxt/issues/3514