@@ -3400,6 +3400,10 @@ def __repr__(self):
34003400
34013401FRAME = 0
34023402
3403+ # Window styles.
3404+ WINDOW_DEFAULT = pyglet .window .Window .WINDOW_STYLE_DEFAULT
3405+ WINDOW_BORDERLESS = pyglet .window .Window .WINDOW_STYLE_BORDERLESS
3406+
34033407# Configuration settings for the canvas.
34043408# http://www.pyglet.org/doc/programming_guide/opengl_configuration_options.html
34053409# The stencil buffer is enabled (we need it to do clipping masks).
@@ -3434,7 +3438,7 @@ def _configure(settings):
34343438
34353439class Canvas (list , Prototype , EventHandler ):
34363440
3437- def __init__ (self , width = 640 , height = 480 , name = "NodeBox for OpenGL" , resizable = False , settings = OPTIMAL , vsync = True ):
3441+ def __init__ (self , width = 640 , height = 480 , name = "NodeBox for OpenGL" , resizable = False , border = True , settings = OPTIMAL , vsync = True ):
34383442 """ The main application window containing the drawing canvas.
34393443 It is opened when Canvas.run() is called.
34403444 It is a collection of drawable Layer objects, and it has its own draw() method.
@@ -3448,6 +3452,7 @@ def __init__(self, width=640, height=480, name="NodeBox for OpenGL", resizable=F
34483452 width = width ,
34493453 height = height ,
34503454 resizable = resizable ,
3455+ style = border is False and WINDOW_BORDERLESS or WINDOW_DEFAULT ,
34513456 config = _configure (settings ),
34523457 vsync = vsync
34533458 )
@@ -4010,7 +4015,7 @@ def run(self, draw=None, setup=None, update=None, frames=100, sort=CUMULATIVE, t
40104015
40114016#--- LIBRARIES ---------------------------------------------------------------------------------------
40124017# Import the library and assign it a _ctx variable containing the current context.
4013- # This mimics the behavior in NodeBox.
4018+ # This mimics the behavior in NodeBox for Mac OS X .
40144019
40154020def ximport (library ):
40164021 from sys import modules
0 commit comments