Can't create window on Wayland 3.36
See original GitHub issueHi Florian, Using pyGLFW 1.11 on Wayland I get the following message when creating a window: …
File "/home/aanjos/.local/lib/python3.8/site-packages/glfw/__init__.py", line 1156, in create_window
return _glfw.glfwCreateWindow(width, height, _to_char_p(title),
File "/home/aanjos/.local/lib/python3.8/site-packages/glfw/__init__.py", line 616, in errcheck
_reraise(exc[1], exc[2])
File "/home/aanjos/.local/lib/python3.8/site-packages/glfw/__init__.py", line 52, in _reraise
raise exception.with_traceback(traceback)
File "/home/aanjos/.local/lib/python3.8/site-packages/glfw/__init__.py", line 595, in callback_wrapper
return func(*args, **kwargs)
File "/home/aanjos/.local/lib/python3.8/site-packages/glfw/__init__.py", line 808, in _handle_glfw_errors
raise GLFWError(message)
glfw.GLFWError: (65544) b'Wayland: Focusing a window requires user interaction'
I’ve tried the “fix” I’ve found on one of the solved issues:
if sys.platform.startswith("linux"):
if "wayland" in os.getenv("XDG_SESSION_TYPE", "").lower():
glfw.window_hint(glfw.FOCUSED, False)
However, I get the following:
File "/home/aanjos/Documents/git_sandbox/g3D/g3D/Drawable.py", line 36, in vbo_vertex_data
gl.glVertexAttribPointer(layout_pos, 3, gl.GL_FLOAT, False, 0, None)
File "/home/aanjos/.local/lib/python3.8/site-packages/OpenGL/latebind.py", line 63, in __call__
return self.wrapperFunction( self.baseFunction, *args, **named )
File "/home/aanjos/.local/lib/python3.8/site-packages/OpenGL/GL/VERSION/GL_2_0.py", line 469, in glVertexAttribPointer
contextdata.setValue( key, array )
File "/home/aanjos/.local/lib/python3.8/site-packages/OpenGL/contextdata.py", line 58, in setValue
context = getContext( context )
File "/home/aanjos/.local/lib/python3.8/site-packages/OpenGL/contextdata.py", line 40, in getContext
raise error.Error(Error: Attempt to retrieve context when no valid context
Everything was working on Ubuntu 20.04. I’ve installed Debian testing today because it has the Linux kernel 5.5 and I got this problem.
I have libgfw3-wayland 3.3.2-1.
Thanks, António
Issue Analytics
- State:
- Created 3 years ago
- Comments:23 (11 by maintainers)
Top Results From Across the Web
[Linux] Wayland support | Voters - Pop - Canny
I run GNOME 3.36 on top of Wayland and Arch Linux. I can create meetings and start the screen share with no reported...
Read more >cannot directly set "Always on Top" for maximised windows
One can only set a maximised window as "Always on Top", ... on Top" is greyed out and can not be toggled; unmaximise...
Read more >Flameshot not launching when using Wayland #675 - GitHub
The commands flameshot gui or flameshot config doesn't do anything. To Reproduce I am using the sway (swaywm) window manager on Wayland.
Read more >[Wayland] Picture-in-picture video window is not always on top
You need to right-click on the PiP window and choose "Always on Top" every time you create one. I see. Hopefully mutter implements...
Read more >Bug #1890141 “Can't fullscreen, or windows get automatically ...
Can't fullscreen, or windows get automatically un-fullscreened, when using fractional scaling ... Package: mutter 3.36.3-0ubuntu0.20.04.1
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I was already discussing this on the pyOpenGL mailinglist:
https://sourceforge.net/p/pyopengl/mailman/pyopengl-users/thread/M5HjopY--3-2%40tutanota.com/
I think I might file a bug report with them, with that solution you just wrote.
Yes, it could be fixed in pyGLFW with something like this:
However I would strongly prefer if this is actually fixed in PyOpenGL as opposed to here, as it has nothing to do with pyGLFW specifically and very, very little with GLFW in general. As far as I am aware, EGL is the OpenGL context creation API for Wayland, so using it as default for Wayland sessions seems generally reasonable when GLX is the only real alternative.