Cannot create Window on Wayland
See original GitHub issueTried this on Ubuntu 18.04, with Wayland (before logging in, select Wayland via the little menu next to the unlock button), and installing the glfw lib via sudo apt install libglfw-wayland
.
This simple example fails:
import glfw
glfw.init()
# glfw.ERROR_REPORTING = False
w = glfw.create_window(640, 480, "glfw window", None, None)
Traceback:
Traceback (most recent call last):
File "<tmp 1>", line 4, in <module>
w = glfw.create_window(640, 480, "glfw window", None, None)
File "/home/almar/.local/lib/python3.6/site-packages/glfw/__init__.py", line 1141, in create_window
monitor, share)
File "/home/almar/.local/lib/python3.6/site-packages/glfw/__init__.py", line 609, in errcheck
_reraise(exc[1], exc[2])
File "/home/almar/.local/lib/python3.6/site-packages/glfw/__init__.py", line 45, in _reraise
raise exception.with_traceback(traceback)
File "/home/almar/.local/lib/python3.6/site-packages/glfw/__init__.py", line 588, in callback_wrapper
return func(*args, **kwargs)
File "/home/almar/.local/lib/python3.6/site-packages/glfw/__init__.py", line 800, in _raise_glfw_errors_as_exceptions
raise GLFWError(message)
glfw.GLFWError: (65544) b'Wayland: Focusing a window requires user interaction'
If I uncomment the line to ignore errors, it works, except the window is undecorated.
Some context: https://github.com/glfw/glfw/issues/1121 seems to suggest that the error is more of a warning? See also these.
It looks like PyGLFW checks if there are errors and raises them as Python exceptions. Perhaps there should be a filter to ignore specific exceptions like this one?
Issue Analytics
- State:
- Created 4 years ago
- Comments:27 (17 by maintainers)
Top Results From Across the Web
FSLeyes cannot create window (under wayland) #45 - GitHub
I am trying to launch FSLeyes, and I get a failure from wxGTK, any idea what's going on? chymera@silenthost ~ $ fsleyes Traceback...
Read more >Firefox on Gnome 42 Wayland can't create new window after ...
I've been having this super annoying issue after gnome 42(I think). I'm using firefox with "MOZ_ENABLE_WAYLAND=1".
Read more >Allow raising application accessory windows under Wayland
Problem: When an application with multiple windows (main window + accessory utility windows) wants to change focus to the accessory window, we ...
Read more >Creating a Window - The Smithay Handbook
We can create a Window by using the Environment::create_window() method. ... by the Wayland server, so you cannot rely on it, you need...
Read more >[SOLVED] Gnome, Wayland and Wine / Newbie Corner / Arch ...
So I tried to start winecfg but it doesn't start either! err:process:init_windows_dirs directory L"C:\\windows" could not be created, error 2 ...
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
Yes, that keeps backwards compatibility and gives users plenty of options. I’ve added more
ERROR_REPORTING
options in 8904cbf64e5fe656c898525fc2442a7385609dab:True
,'raise'
or'exception'
: raise an exception'warn'
or'warning'
: issue a warning'log'
: log to the ‘glfw’ logger on debug level'ignore'
orFalse
: do nothingValueError
about the invalid value ofERROR_REPORTING
, including the GLFW error in the message.@FlorianRhiem deserves a medal or something. It’s the truth.