Git Product home page Git Product logo

Comments (16)

andydotxyz avatar andydotxyz commented on May 22, 2024 1

I had a quick look and there is nothing obvious unfortunately so I will have to dig into this further. I will work through old states of the code and see if I can find what broke Windows :(

from fyne.

andydotxyz avatar andydotxyz commented on May 22, 2024

It looks like you’re missing the vector graphics module in efl - which version did you manage to install?

from fyne.

andydotxyz avatar andydotxyz commented on May 22, 2024

The buttons not working issue is a new one on me though! What version of Windows is this?

from fyne.

zet4 avatar zet4 commented on May 22, 2024

This was run on Windows 10 Home 1809 - Build 17763.1
And I installed the latest EFL, according to Win-Builds.
image

from fyne.

andydotxyz avatar andydotxyz commented on May 22, 2024

Oh dear, I had not realised how far behind winbuilds was. EFL current release is 1.21.1 and Fyne requires 1.19 for the vector graphics to appear. I guess we will have to push forward with the custom build of EFL to bootstrap Fyne with all the features.

I will try to replicate the buttons issues locally. It did work earlier but there may be a strange recent issue - I noticed that macOS does not always register presses correctly either :(

If you are interested in investigating further then adding some logging to the mouse down callbacks within desktop/canvas.go may be a help.

Apologies!

from fyne.

zet4 avatar zet4 commented on May 22, 2024

I am not really sure how to update my EFL installation, msys's pacman doesn't know of efl either.
Anyway, I will try to figure out the window opening issue for now.

from fyne.

zet4 avatar zet4 commented on May 22, 2024

Right so I added some basic logging to console, the issue wasn't button down event.
Rather it seems to be something with C.ecore_thread_main_loop_begin:

$ go run main.go
2018/10/18 12:27:54 create window Examples
2018/10/18 12:27:54 engine software_gdi
2018/10/18 12:27:54 main loop begin
2018/10/18 12:27:54 window init
2018/10/18 12:27:54 canvas thingy
2018/10/18 12:27:54 main loop end
2018/10/18 12:27:54 window &{0x426be30 0xc0000c8100 false false false <nil>}
2018/10/18 12:27:54 callbacks done...
2018/10/18 12:27:59 Form clicked...
2018/10/18 12:27:59 create window Form
2018/10/18 12:27:59 engine software_gdi

main loop begin should have followed after engine line but it doesn't and so that function never returns, problematic line being 263 in desktop/window.go, that is of course not the problematic line, something, somewhere, is never releasing the lock (which I am guessing is the purpose of C.ecore_thread_main_loop_end call), I tried looking at other references of this C call but none look problematic either, so I am lost as to why this is happening... but I bet this is tied to EFL version being old af.

from fyne.

andydotxyz avatar andydotxyz commented on May 22, 2024

Yes I think you’re on to something there. Can you possibly print the return of the main_loop_begin call and also the result of C.eina_main_loop_is? That should tell us more about the context. I’d guess that either there is a weird behaviour with those methods or that the threading model changed and so we should be using a different arrangement of safety checks.

from fyne.

zet4 avatar zet4 commented on May 22, 2024

Seems like for the first window main_loop_is reports 1, anything after that returns 0.

2018/10/18 18:07:57 create window Examples
2018/10/18 18:07:57 engine software_gdi
2018/10/18 18:07:57 main_loop_is 1
2018/10/18 18:07:57 main loop begin 1
2018/10/18 18:07:57 window init
2018/10/18 18:07:57 canvas thingy
2018/10/18 18:07:57 main loop end
2018/10/18 18:07:57 window &{0xdfbe30 0xc0000c8100 false false false <nil>}
2018/10/18 18:07:57 callbacks done...
2018/10/18 18:08:13 Form clicked...
2018/10/18 18:08:13 create window Form
2018/10/18 18:08:13 engine software_gdi
2018/10/18 18:08:13 main_loop_is 0

Though I am not sure the order I am making the calls in is correct...

func CreateWindowWithEngine(engine string) fyne.Window {
    // ...
    log.Println("main_loop_is", C.eina_main_loop_is())
    log.Println("main loop begin", C.ecore_thread_main_loop_begin())
    // ...

from fyne.

zet4 avatar zet4 commented on May 22, 2024

It's worth noting main_loop_begin only returns for the first window, and never afterwards.

from fyne.

andydotxyz avatar andydotxyz commented on May 22, 2024

Thanks for all of that.
I have pushed an update to Fyne that refactors this a little to only request a thread change if needed.

Can you please update and let me know how, if at all, this changes things?
It could fix it - or could make it worse...

from fyne.

zet4 avatar zet4 commented on May 22, 2024

Well I tried the latest changes and all that did for me is themes stopped working, ie. Light/Dark doesn't do anything. I did put log message into the function to check if it was being called and it does indeed log but the settings either don't re-apply or don't change, not sure which. Nothing else seems to have changed.

from fyne.

andydotxyz avatar andydotxyz commented on May 22, 2024

Ok thanks. I guess that’s at least consistent..? I will get my Windows machine updated this weekend and see if I can replicate.

from fyne.

zet4 avatar zet4 commented on May 22, 2024

While unrelated now to this issue, I do still wonder how one would go about getting latest or at least minimal required version of EFL for windows now.

from fyne.

andydotxyz avatar andydotxyz commented on May 22, 2024

This threading issue is now fixed :)

from fyne.

zet4 avatar zet4 commented on May 22, 2024

Yep, working for me now, thanks!

from fyne.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.