buggins / dlangui

Cross Platform GUI for D programming language
Boost Software License 1.0
802 stars 120 forks source link

X11 backend #106

Closed buggins closed 8 years ago

buggins commented 8 years ago

To avoid SDL2 library dependency it would be great to have pure X11 based backend for DlangUI

theyamo commented 8 years ago

Out of curiosity, what makes SDL2 dependency a bad thing and why is spending effort on a dying platform, which X11 more or less is, a good thing?

buggins commented 8 years ago

To reduce dependencies. libSDL2 requires libX11 as a dependency anyway.

E.g. on OSX, libSDL2 requires to install XQuarx.

Checking possibility to implement Wayland backend as well.

buggins commented 8 years ago

X11 backend is mostly working, including OpenGL support. Known issues:

MggMuggins commented 6 years ago

Any progress on a pure Wayland backend? That is going to be likely more difficult than X, but it would be good to see one.

MggMuggins commented 6 years ago

Sort of a bump to my previous question, but also a question. Is there a way to force DLangUI to use the X11 backend? SDL is doing weird things to KDE Plasma.

FreeSlave commented 6 years ago

Use subconfiguration in your project dub file. See example https://github.com/buggins/dlangui/blob/master/examples/example1/dub.json#L37

Can you elaborate on what do you mean by weird things? Maybe it's dlangui SDL backend problem, not SDL itself.

MggMuggins commented 6 years ago

Thanks, I appreciate that.

It's possible, although I don't think I currently have any SDL programs installed anyway, so I can't really test it. I'm using Latte Dock specifically for both my panels (in KDE), so it's possible that it's a problem with Latte. I may do some research, but the X backend will probably fix it.

EDIT: The X backend did fix it, but there are some fairly serious bugs (such as no cursor in the textedit widget...). Do you know of any small linux SDL programs that I could use to test?

MggMuggins commented 6 years ago

As per this issue, I believe that it is an implementation issue with Dlangui. It's basically forcing kwin to turn off compositing. Anyone have any ideas on why this is happening? As per the issue, I can simply not allow apps to turn off compositing, but I'd rather not, given that I do play some games that I would like the best performance possible.

FreeSlave commented 6 years ago

The X backend did fix it, but there are some fairly serious bugs (such as no cursor in the textedit widget...)

I don't have this bug. Does it happen in example1 for you?

FreeSlave commented 6 years ago

Also there's issue in dlangide https://github.com/buggins/dlangide/issues/215

MggMuggins commented 6 years ago

I haven't tested it. I also sometimes have issues with X cleaning up resources. Let's say I prefer to use SDL, especially now that I have this bug fixed...

FreeSlave commented 6 years ago

Well, issues will never be fixed if you won't test and report them. I think we need to strive to get stable x11 backend. And it's not only to get rid of sdl2 dependency. Some things just cannot be implemented using sdl2 backend (e.g. icon tray).

MggMuggins commented 6 years ago

The cursor does show in edit lines using the X11 backend in example1.