Skip to content
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

on_resize event handler not called on window resize on Linux (RC regression) #773

Open
GoogleCodeExporter opened this issue Apr 6, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

Have you tried Pyglet 1.2 alpha1 or the repository code?

This issue does not happen in 1.2alpha1, it happens on the 1.2rc1 recently 
released on bitbucket and on the most recent version found there. From reading 
the mailing list I think that release is "official", and this is still the 
issue tracker for that code.

What steps will reproduce the problem?

I can reproduce it using this code:

import pyglet

window = pyglet.window.Window(vsync=False, resizable=True)
label = pyglet.text.Label('Hello, world',
                          color=(255,255,255,255),
                          x=window.width//2, y=window.height//2,
                          anchor_x='center', anchor_y='center',
                          )

@window.event
def on_draw():
    window.clear()
    label.draw()

@window.event
def on_resize(width, height):
    label.x = window.width // 2
    label.y = window.height // 2
pyglet.app.run()

The window shows up and can be resized, but the on_resize function is called 
once only on window creation but never again.

There is no error message, but expected behavior does not happen.

I've attached the output of python -m pyglet.info (The version there is 
misreported as being the alpha)

Any additional info (platform/language/hardware) that may be relevant?

I'm on Ubuntu 14.04 (trusty) on the Unity desktop. It happens on both Python 
2.7 and 3.4

Thanks!

Original issue reported on code.google.com by [email protected] on 27 Jan 2015 at 10:15

Attachments:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant