-
Notifications
You must be signed in to change notification settings - Fork 35
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
No window appears when running App.Simple application executable #38
Comments
Make sure you comple with -threaded. @owickstrom this is definitely something which could be better documented. |
For the first case, as @aristaeus says, you need to add the -threaded GHC option. For the second, I think you're right about the missing destroy listener. See the examples on how it's done there, with a special event for window being closed, eventually leading to |
The hint to use As for the second one in my project I actually use the example copy-pasted from this repo and it does have the special event for window closing which you mention, as you can see here, but the issue is still there. When I said that there's no listener for Did you try to run |
Oh, okay. Sorry I'm on vacation and I don't have a laptop. Let me try this
with ghci next week, and I'll get back to you.
Den ons 23 jan. 2019 19:14 skrev dimsuz <[email protected]>:
… The hint to use -threaded helped to fix the first issue, thank you!
As for the second one in my project I actually use the example
*copy-pasted* from this repo and it does have the special event for
window closing which you mention, as you can see here
<https://github.com/dimsuz/amfora-hs/blob/master/src/Main.hs#L26>, but
the issue is still there.
When I said that there's no listener for #destroy I've meant not the
client code, but library code, this is the event used in haskell-gi
example, but not emitted by App.Simple internally (not sure if needed,
just an observation).
Did you try to run Hello example from stack ghci, does it close normally
for you? I didn't try to compile this repo on my machine, will try soon. If
this only happens in my sample-project repository, but not in
gtk-gi-declarative repo, must be some local issue...
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#38 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABZYCL99ym_Ck-5pqhNWBqjOvyw3IQeQks5vGLStgaJpZM4Z9U_N>
.
|
Thanks, I'll report back if I find something interesting too. Have a good vacation! :) |
OK, I can reproduce this in GHCi (and |
I poked around a bit trying to fix the hang on exit in
My GHC version: 8.6.5 |
I ran into the exact same problem and the |
Switching the propagation, if I'm not mistaken (it's been a while since I hacked on this), has the unfortunate effect of the special |
I've also confirmed it hangs in GHCi for me. Can't say say for certain, but I think it has worked before (maybe an older GHCi or haskell-gi package version). |
I have created a standalone application based on
GI.Gtk.Declarative.App.Simple
. Its sources are copy paste of the Hello.hs example.You can find the repository here.
I observe the following:
stack ghci
and runningmain
manually somehow does produce a window (greeting names cycle, all's working), but then there's another problem: when I click onx
(close) button, the application hangs withx
pressed down. Inghci
I can see thatmain
has returned, but window stays on screenTo be sure that all this is something related to
gi-gtk-declarative
, I tried to replacemain
contents with some simple hello-world window fromhaskell-gi
samples and it does work both withstack exec
andstack ghci
: window is shown and closed.I'm not sure why no window appears for the case
1.
, but as for window freeze I suspect that this might have to do with the fact that there's no listener to window#destroy
event inApp.Simple
code, but I might be mistaken.Stack version:
1.9.3
Resolver:
lts-13.2
(ghc version8.6.3
)gi-gtk-declarative:
0.4.1
gi-gtk-declarative-app-simple:
0.4.0
The text was updated successfully, but these errors were encountered: