Different toolkit support: SDL Experiments

Discussions about the development and maturation of the platform code (UXP).
Warning: may contain highly-technical topics.

Moderators: trava90, athenian200

User avatar
mittorn
Hobby Astronomer
Hobby Astronomer
Posts: 19
Joined: 2026-01-13, 19:32

Re: Different toolkit support: SDL Experiments

Post by mittorn » 2026-01-22, 11:11

Funny fact: most russian ISPs blocked access to Pale Moon git repo.
I cannot even update to 34.0.0

User avatar
Moonchild
Project founder
Project founder
Posts: 38821
Joined: 2011-08-28, 17:27
Location: Sweden

Re: Different toolkit support: SDL Experiments

Post by Moonchild » 2026-01-22, 12:07

mittorn wrote:
2026-01-22, 11:11
Funny fact: most russian ISPs blocked access to Pale Moon git repo.
I cannot even update to 34.0.0
Heh, really? Why would Russia even care about Pale Moon?
Maybe you can use a VPN to get to it or something.
"There is no point in arguing with an idiot, because then you're both idiots." - Anonymous
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

q160765803
Moon lover
Moon lover
Posts: 81
Joined: 2023-04-13, 07:57

Re: Different toolkit support: SDL Experiments

Post by q160765803 » 2026-01-22, 12:21

mittorn wrote:
2026-01-22, 11:11
Funny fact: most russian ISPs blocked access to Pale Moon git repo.
I cannot even update to 34.0.0
IIRC there is unofficial mirror in github, I wonder if you can access it?

User avatar
mittorn
Hobby Astronomer
Hobby Astronomer
Posts: 19
Joined: 2026-01-13, 19:32

Re: Different toolkit support: SDL Experiments

Post by mittorn » 2026-01-22, 13:49

Moonchild wrote:
2026-01-22, 12:07
Heh, really? Why would Russia even care about Pale Moon?
They blocked entire Contabo network with DPI (TCP connects, but hangs after 1-2 packets, UDP is blocked)
I still have access from VPS, which is not covered by DPI.
Pale Moon forum and site works, but Basilisk addons site is hosted on Contabo too and cannot load some assets (but page loads)

User avatar
Moonchild
Project founder
Project founder
Posts: 38821
Joined: 2011-08-28, 17:27
Location: Sweden

Re: Different toolkit support: SDL Experiments

Post by Moonchild » 2026-01-22, 13:58

Yeah I'm using Contabo for the repo and xref because it's offered me a set of resources fitting to that use without breaking the bank for it.
"There is no point in arguing with an idiot, because then you're both idiots." - Anonymous
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
mittorn
Hobby Astronomer
Hobby Astronomer
Posts: 19
Joined: 2026-01-13, 19:32

Re: Different toolkit support: SDL Experiments

Post by mittorn » 2026-01-22, 14:30

Okay, i fetched repo using VPS and...
You do not have the required permissions to view the files attached to this post.

User avatar
mittorn
Hobby Astronomer
Hobby Astronomer
Posts: 19
Joined: 2026-01-13, 19:32

Re: Different toolkit support: SDL Experiments

Post by mittorn » 2026-02-04, 16:54

Running Basilisk on SailfishOS.
lipstick's wayland implementation is very limited, so SDL3 does not show anything, but SDL2 works with fullscreen windows
Patched SDL2 shows maliit keyboard, but it's very buggy and only sends text on word delimiters. Maybe with SDL_TextEdit APIs it will work better
You do not have the required permissions to view the files attached to this post.

User avatar
athenian200
Contributing developer
Contributing developer
Posts: 1632
Joined: 2018-10-28, 19:56
Location: Georgia

Re: Different toolkit support: SDL Experiments

Post by athenian200 » 2026-02-06, 06:14

I mean, this isn't a crazy idea... at least not the SDL on desktop part. I think mobile is probably out of scope, but last time I checked there's nothing out there better than the ancient Arachne Web Browser using SVGALib for diehard terminal fans who don't want to deal with X11 or Wayland just to run a competent web browser. This would probably be the biggest splash in that niche in a long time, since I believe SDL2.0 would support KMSDRM, which is basically the modern Linux answer to the old framebuffer.

The other interesting thing is that SDL is incredibly cross-platform... like I think that backend would even work on Windows as a fallback if we needed it there for some reason (because SDL does support Windows), though obviously it would never be preferred over native support.

But honestly, even if it doesn't work perfectly... I'm impressed Pale Moon (or at least some vaguely UXP-based browser) can be made to work on SDL at all, and if his screenshots are accurate, it does. I thought GTK/X11 was far too heavily baked into the way we do things on Unix-like operating systems for something like SDL support to be easy to add, but perhaps that's just because I was looking at the NPAPI side of things too much...
"The Athenians, however, represent the unity of these opposites; in them, mind or spirit has emerged from the Theban subjectivity without losing itself in the Spartan objectivity of ethical life. With the Athenians, the rights of the State and of the individual found as perfect a union as was possible at all at the level of the Greek spirit." -- Hegel's philosophy of Mind

User avatar
mittorn
Hobby Astronomer
Hobby Astronomer
Posts: 19
Joined: 2026-01-13, 19:32

Re: Different toolkit support: SDL Experiments

Post by mittorn » 2026-02-06, 14:34

SDL port is based on uikit (iOS) port, which does not require anything except of creating windows
SDL is more limited because it does not support child widgets (so child widget is emulated) and does not support popups on non-desktop targets like KMS,
For popups i implemented "fake popups" mode, that handles popups in layout engine without creating windows. And works fine and even better than platform popups because does not need create windows, composite transparent windows, etc.
I tried KMS mode and it works too when SDL_FRAMEBUFFER_ACCELERATION set to opengl, but pure software mode and opengl omtc does not intialize, possibly due to some SDL2 bugs and mouse is not visible mouse is visible, but only on first display. When opening second window, it opens on different display and cursor stops update.
Working branch is uploaded here, but it will be improved rebased:
https://git.disroot.org/mittorn/UXP/src/branch/sdl-wip

User avatar
mittorn
Hobby Astronomer
Hobby Astronomer
Posts: 19
Joined: 2026-01-13, 19:32

Re: Different toolkit support: SDL Experiments

Post by mittorn » 2026-02-07, 00:35