Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange gtk 1.2.10 behaviors with nano-X #68

Open
0ffthemap opened this issue Sep 8, 2022 · 8 comments
Open

Strange gtk 1.2.10 behaviors with nano-X #68

0ffthemap opened this issue Sep 8, 2022 · 8 comments

Comments

@0ffthemap
Copy link

Searching the mailing list, changelog, and google give indications that gtk 1.2 is/was working with nano-x.

I could not find any actual instructions, like you made for fltk. :-(
I have gtk compiled against NX11 and nano-x from this git page for armv7.

Tried a number of gtk programs with similar issue.

Any movement of a gtk scrollbar, or hitting enter in a multi line text widget freezes the gtk app. The nano-x window is stll movable, but have to kill the gtk app from a terminal.

Most other widgets seem to work fine.

Compiling same gtk stack against X11 works as expected.

Are there instructions for configuring gtk 1.2 to work properly with nano-X ?

My nano-x config is :

ARCH = LINUX-NATIVE
SHAREDLIBS = Y
SHAREDLINK = N
DEBUG = N
OPTIMIZE = Y
VERBOSE = Y
THREADSAFE = Y
PARALLEL = N

SCREEN = FB
MOUSE = DEVMICEMOUSE
KEYBOARD = SCANKBD
SCREEN_WIDTH = 1024
SCREEN_HEIGHT = 768

MICROWIN = N
NANOX = Y
NUKLEARUI = Y
NX11 = Y
ENGINE = Y
TINYWIDGETS = Y

FBEMULATOR = N
MICROWINDEMO = N
MICROWINMULTIAPP = N
NANOXDEMO = Y
HAVE_VNCSERVER_SUPPORT = N
VNCSERVER_PTHREADED = N
LIBVNC = -lvncserver
INCVNC =

LINK_APP_INTO_SERVER = N
NANOWM = Y

HAVE_SHAREDMEM_SUPPORT = Y

HAVE_FILEIO = Y

HAVE_BMP_SUPPORT = Y
HAVE_GIF_SUPPORT = Y
HAVE_PNM_SUPPORT = Y
HAVE_XPM_SUPPORT = Y

HAVE_JPEG_SUPPORT = Y
INCJPEG =
LIBJPEG = -ljpeg

HAVE_PNG_SUPPORT = Y
INCPNG =
LIBPNG = -lpng
INCZ =
LIBZ = -lz

HAVE_TIFF_SUPPORT = N
INCTIFF =
LIBTIFF = -ltiff

HAVE_PCF_SUPPORT = Y
HAVE_PCFGZ_SUPPORT = Y
PCF_FONT_DIR = "fonts/pcf"

HAVE_FREETYPE_2_SUPPORT = Y
HAVE_HARFBUZZ_SUPPORT = N
INCFT2LIB = /usr/include
LIBFT2LIB = -lfreetype
FREETYPE_FONT_DIR = "fonts/truetype"

HAVE_T1LIB_SUPPORT = N
T1LIB_FONT_DIR = "fonts/type1"
INCT1LIB =
LIBT1LIB = -lt1

HAVE_FNT_SUPPORT = Y
HAVE_FNTGZ_SUPPORT = Y
FNT_FONT_DIR = "fonts/fnt"

ERASEMOVE = Y
UPDATEREGIONS = Y

NOFONTS = N
NOCLIPPING = N

USE_EXPOSURE = Y
VTSWITCH = Y
FBREVERSE = N
GRAYPALETTE = N
HAVETEXTMODE = Y

SCREEN_PIXTYPE = MWPF_TRUECOLORARGB
SCREEN_DEPTH = 8

gtk 1.2.10 was configured as : ./configure --disable-nls --disable-glibtest

Tried 2 different tarballs for gtk 1.2.10, same outcome.

@ghaerr
Copy link
Owner

ghaerr commented Sep 8, 2022

Hello @0ffthemap,

I've tried cloning GTK+ 1.2.10 from https://github.com/tindzk/GTK but it won't configure on my OS, which is macOS, so I can't yet reproduce your problem.

Perhaps rebuild Nano-X with DEBUG=Y, that might help show some debug output as to where the program is hanging. While it is more work, producing a single executable using LINK_APP_INTO_SERVER=y can help a lot, as the you can then run gdb on it. However, running gdb on the executable as-is with DEBUG=y (which should set CFLAGS += -g) may show us where in NX11 or GTK the problem is, using the stack backtrace bt command.

Thank you!

@bocke
Copy link

bocke commented Nov 18, 2022

@ghaerr That hasn't been updated for quite a while. It's very likely not to work nowadays.

Slackware Linux team still maintains gtk+ 1.2.10 package. You might have better luck with their patches. They might work on macOS, too. Good luck.

Edit: glib will likely have to be patched too.

@0ffthemap
Copy link
Author

0ffthemap commented Nov 19, 2022

@bocke thank for the links for the Slackware patches.
They may be useful in getting GTK1 working again in Nano-X
GTK1 was working at one point with Nano-X after 1.2.10 was released, according to the older
Nano-X release notes & mailing lists I read.

As I mentioned on the OP, the UI freeze issue is not with GTK1 per se, as all GTK code tested I against Nano-X was first tested successfully against X11 & X11-lib with no issues.

I used the GLIB & GTK 1.2.10 sources both from the Gnome FTP site
as well as the updated & patched tarballs from github:

https://github.com/dimkr/gtk

The outcome was the same freeze behavior, although I had to do some patching to
the Gnome sources to get them to even compile with GCC 9 & 10

@ghaerr I had to temporarily mothball the project as I am not a coder, so
I was not able to do the debugging parts myself.
If your stuck with Macos , a VM would allow to at least see if you can duplicate the issue.

UTM is a decent VM, free & open source for IOS and Macos
https://github.com/utmapp/UTM

I know GKT1 is ancient, but its still the most complete cross platform theme-able ultralight UI out there that has been mass tested for decades, and has 100's of good usable programs ready run or compile with it.
Not to mention bindings for just about every language out there.

I think its a perfect fit with Nano-X,

GTK1 mostly is still working in Nano-X, just need some minor tweaking in current Nano-X sources to fix the freeze.
Other UI libs may have similar issues as well, just not discovered yet.

@ghaerr
Copy link
Owner

ghaerr commented Nov 23, 2022

Hello @0ffthemap, hello @bocke,

Thanks for the information. I would guess that the problem is likely in NXLIB, that portion of Nano-X that converts X11 function calls into the Nano-X API, and vice versa. NXLIB also handles the event conversions, where I'm guessing this freeze may be occurring.

I haven't had much time to dig into GTK+ for quite a while, but will try to find some time to use UTM or another VM to run Linux to compile GTK. Compiling Microwindows with config DEBUG=Y will display more information from that library, which may be useful in the meantime. If either of you has more time, I'd be happy to help pinpoint the freeze location and provide an NXLIB fix, but I need more information about the freeze details and debug output.

Thank you!

@bocke
Copy link

bocke commented Dec 2, 2022

That would be best for @0ffthemap to do as he is the original poster of this issue and probably the most invested in that effort.

I just suggested something that might help. :)

@jserv
Copy link

jserv commented Oct 19, 2024

NanoGTK, a port of GTK version 1.2 to nano-X, is available. Additionally, GTK1 can be compiled using NX11. However, GTK1 is incompatible with GTK2, resulting in very few modern applications using GTK1. For more details, refer to the source code and documentation provided below.

@ghaerr
Copy link
Owner

ghaerr commented Oct 21, 2024

Hello @jserv,

Have you looked at or played with NanoGTK (or perhaps GTK v1.2.10) lately? I've always thought it would be nice to have a full(er) featured desktop for Nano-X available but haven't pursued this, as it seems that even NanoGTK v1.0pre1 is 20 years old.

I'm developing on macOS but could perhaps install UTM for Linux emulation and look further at NanoGTK/GTK, if anyone is interested.

I noticed you've recently written X11-2048. I happened to see a version of that game on an airplane the other day. From a quick look, it should compile up and run using Nano-X/NXlib without modification.

Thank you!

@jserv
Copy link

jserv commented Oct 22, 2024

Have you looked at or played with NanoGTK (or perhaps GTK v1.2.10) lately? I've always thought it would be nice to have a full(er) featured desktop for Nano-X available but haven't pursued this, as it seems that even NanoGTK v1.0pre1 is 20 years old.

nanogtk.mp4

Yes, I managed to make NanoGTK work on my computer. After providing the C runtime library, its demo worked for me, as shown in the above video. The demo application includes an address book, calculator, notepad, and on-screen keyboard, which supports both English and Chinese.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants