Giter Site home page Giter Site logo

Comments (7)

Starbuck5 avatar Starbuck5 commented on June 15, 2024

Relevant to #2603

from pygame-ce.

yunline avatar yunline commented on June 15, 2024

The bug can be fixed if you add a pygame.init(), because the init hook of window module is called when display module init, then the init hook sets the event watch.

from pygame-ce.

Starbuck5 avatar Starbuck5 commented on June 15, 2024

Ah, I didn't notice it was just about the resizability!

Using pygame.display.set_mode with pygame.RESIZABLE this problem never surfaces, so it probably shouldn't here?

from pygame-ce.

yunline avatar yunline commented on June 15, 2024

Using pygame.display.set_mode with pygame.RESIZABLE this problem never surfaces

The resize event watch of display module is set in set_mode(), so it's not influenced by this bug.

from pygame-ce.

Starbuck5 avatar Starbuck5 commented on June 15, 2024

Sure. I’m saying that since this error can’t occur with pygame.display, it shouldn’t be able to occur with pygame.window.

from pygame-ce.

ankith26 avatar ankith26 commented on June 15, 2024

I see two ways to resolve this

  • Window constructor calls pygame.display.init()
  • Window constructor requires pygame.display.init() to be called already, and error otherwise

I prefer the second way. pygame.display.set_mode actually goes the first way however

from pygame-ce.

Starbuck5 avatar Starbuck5 commented on June 15, 2024

The way I see it, the modern way is to make initializations more automatic. And it's precedented in display.set_mode.

But either option would be better than the current setup.

from pygame-ce.

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.