Fix logic for setting `alpha_size=8` when transparent/overlay Window style is set.
@@ -594,8 +594,10 @@ class BaseWindow(with_metaclass(_WindowMetaclass, EventDispatcher)):
screen = display.get_default_screen()
if not config:
- for template_config in [gl.Config(double_buffer=True, depth_size=24),
- gl.Config(double_buffer=True, depth_size=16),
+ # This appears to be necessary on some platforms:
+ alpha = 8 if style in ('transparent', 'overlay') else None
+ for template_config in [gl.Config(double_buffer=True, depth_size=24, alpha_size=alpha),
+ gl.Config(double_buffer=True, depth_size=16, alpha_size=alpha),
None]:
try:
config = screen.get_best_config(template_config)
@@ -605,9 +607,6 @@ class BaseWindow(with_metaclass(_WindowMetaclass, EventDispatcher)):
if not config:
raise NoSuchConfigException('No standard config is available.')
- if self.style in ('transparent', 'overlay'):
- config.alpha_size = 8
-
if not config.is_complete():
config = screen.get_best_config(config)
