Giter Club home page Giter Club logo

Comments (2)

scottrules44 avatar scottrules44 commented on June 8, 2024

It works fine on my Mac with the newest version.

Screen.Recording.2023-04-23.at.12.44.47.AM.mov

timer.performWithDelay( 5000, function() native.setProperty( "windowSize", { width =100, height = 100 } ) end )

from corona.

thoorin avatar thoorin commented on June 8, 2024

Thanks for the testing, because of your post I looked if issue could be somwhere else and found the problem. Just before setting windowSize I set windowMode to normal (from fullscreen). On windows that worked fine but on mac, when you go from fullscreen to windowed mode it is smooth transition that takes split of a second. If you try to set size during that time it will be ignored, whereas on win the transition is immediate, so calling it right after that is ok.

So if anyone encounters the same issue, switching to normal mode from fullscreen and giving it size, from previous code: native.setProperty( “windowMode”, “normal”) native.setProperty( “windowSize”, { width = 100, height = 100 } )

you have to add timer before setting size so app has time to fully transition to windowedMode.
So I had to change previous code to:
native.setProperty( “windowMode”, “normal”) timer.performWithDelay( 1000, function() native.setProperty( “windowSize”, { width = 100, height = 100 } ) end )

I tried also interval of 500 but that was not enough, but 1000 should be long enoug.

from corona.

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.