hnbrowser - close button not working
When I press the close button, a message is displayed:
NOT onCloseRequest tid=4357
but the window is not closed.
The process is right:
$ ps -A | grep hnb
4357 pts/0 00:01:53 hnbrowser
The app becomes unresponsive. That is what I actually saw thinking that the resizing was not working properlly. I can resize, but the app does not adapt:
If I press Ctrl+C, I get:
NOT onCloseRequest tid=4357
^CGot Ctrl+C exiting!
^CGot Ctrl+C exiting!
^CGot Ctrl+C exiting!
^CGot Ctrl+C exiting!
but the app does not close.
Thanks! Could you post what OS/distro you’re running? Also if Linux whether it’s Wayland or x11?
Here you are:
$ uname -a
Linux lenovo 6.13.5-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 27 Feb 2025 18:09:44 +0000 x86_64 GNU/Linux
$ echo $XDG_SESSION_TYPE
wayland
the same happens on:
Linux dnd 6.8.0-52-generic #53~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Jan 15 19:18:46 UTC 2 x86_64 x86_64 x86_64
GNU/Linux
No LSB modules are available.
Distributor ID: Linuxmint
Description: Linux Mint 21.3
Release: 21.3
Codename: virginia
x11
Thanks guys! I think I fixed it. I found it was happening on MacOS as well. It's working on MacOS now in 0.14 release. If anyone wants to try it. Else I'm going to try and get my Linux VMs running to test on.
Not sure if I updated everything right, but it is not working for me yet.
$ ./hnbrowser
NOT Figuro
tid: 19457
configFile: /home/jose/.config/figuro/hnbrowser.json
NOT loadLastWindow
tid: 19457
config: (pos: ivec2(0, 69), size: ivec2(1920, 1011))
INF Running renderer
tid: 19457
DBG CSS theme into app
tid: 19469
numberOfCssRules: 0
NOT Start AppTicker
tid: 19470
period: 14 milliseconds
Setting up loading
NOT Starting CSS Watcher
tid: 19471
NOT Started CSS Watcher
tid: 19471
theme: /home/jose/Documentos/src/nimlang/figuro/figuro/examples/theme.css
appTheme: /home/jose/Documentos/src/nimlang/figuro/figuro/examples/hnbrowser.css
NOT Loading CSS file
tid: 19471
cssFile: /home/jose/Documentos/src/nimlang/figuro/figuro/examples/hnbrowser.css
PIXIE LH: 20.69999885559082
NOT Loaded CSS file
tid: 19471
cssFile: /home/jose/Documentos/src/nimlang/figuro/figuro/examples/hnbrowser.css
NOT CSS Updated:
tid: 19471
file: /home/jose/Documentos/src/nimlang/figuro/figuro/examples/hnbrowser.css
css: 10
WRN onFocusChange
tid: 19457
DBG CSS theme into app
tid: 19469
numberOfCssRules: 10
NOT CSS Updated: second:
tid: 19471
file: /home/jose/Documentos/src/nimlang/figuro/figuro/examples/hnbrowser.css
css: 10
DBG CSS theme into app
tid: 19469
numberOfCssRules: 10
Load clicked: Init
Load clicked: Done
Starting page load...
TABLE:
got stories
PIXIE LH: 18.0
Load clicked: Exit
HN Story:
Submission(rank: "1.", upvote: Upvote(id: "up_43557873", href: "vote?id=43557873&how=up&goto=news"), link: Link(title: "Animals Made from 13 Circles (2016)", href: "https://www.dorithegiant.com/2016/05/13-animals-made-from-13-circles.html", siteFrom: "from?site=dorithegiant.com", siteName: "dorithegiant.com"), subText: SubText(votes: 134, user: "jihadjihad", time: "1 hour ago", comments: 35))
Starting page load...
error running html2markdown: Additional info: Could not find command: 'html2markdown'. OS error: No such file or directory
error running html2markdown: /home/jose/.nimble/pkgs2/sigils-0.11.8-750aec2be9b5996d39bb4e7ed5f8a7a59339f26e/sigils/threadBase.nim(219) runThread
/home/jose/.nimble/pkgs2/sigils-0.11.8-750aec2be9b5996d39bb4e7ed5f8a7a59339f26e/sigils/threadBase.nim(209) runForever
/home/jose/.nimble/pkgs2/sigils-0.11.8-750aec2be9b5996d39bb4e7ed5f8a7a59339f26e/sigils/threadBase.nim(192) poll
/home/jose/.nimble/pkgs2/sigils-0.11.8-750aec2be9b5996d39bb4e7ed5f8a7a59339f26e/sigils/threadBase.nim(183) exec
/home/jose/.nimble/pkgs2/sigils-0.11.8-750aec2be9b5996d39bb4e7ed5f8a7a59339f26e/sigils/core.nim(10) callMethod
/home/jose/.nimble/pkgs2/sigils-0.11.8-750aec2be9b5996d39bb4e7ed5f8a7a59339f26e/sigils/core.nim(20) callMethod
/home/jose/.nimble/pkgs2/sigils-0.11.8-750aec2be9b5996d39bb4e7ed5f8a7a59339f26e/sigils/slots.nim(218) slot
/home/jose/Documentos/src/nimlang/figuro/figuro/examples/hnloader.nim(187) loadPageMarkdown
/home/jose/.choosenim/toolchains/nim-2.0.14/lib/pure/osproc.nim(1014) startProcess
/home/jose/.choosenim/toolchains/nim-2.0.14/lib/pure/osproc.nim(1126) startProcessAuxFork
/home/jose/.choosenim/toolchains/nim-2.0.14/lib/std/oserrors.nim(92) raiseOSError
got markdown204
INF timings
tid: 19457
name: renderAvgTime
time: 0.052 ms
NOT onCloseRequest
tid: 19457
Thanks, I'll take a look.
I've got this fixed on the latest PR branch! Seems on Linux (maybe windows) you have to explicitly quit. Likely there's some threads running that keep it active. Adding an explicit quit solves it though.