! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
GLFW blocks forever trying to instantiate a window
Status:
RESOLVED: FIXED

Comments

Description Filipp Andjelo 2015-03-08 23:20:32 CET
When calling glfwCreateWindow() the call blocks forever. This problem looks to be very similar to one in Ubuntu/Unity due to wrong handling of _NET_REQUEST_FRAME_EXTENTS. Please see accordant bug for GLFW:

https://github.com/glfw/glfw/issues/368
Comment 1 Olivier Fourdan editbugs 2015-03-09 07:24:14 CET
Please provide a reproducer
Comment 2 Olivier Fourdan editbugs 2015-03-09 09:09:50 CET
The spec [1] states:

[1] http://standards.freedesktop.org/wm-spec/wm-spec-1.4.html#idm139915845231248

"A Client whose window has not yet been mapped can request of the Window Manager an estimate of the frame extents it will be given upon mapping. To retrieve such an estimate, the Client MUST send a _NET_REQUEST_FRAME_EXTENTS message to the root window. The Window Manager MUST respond by estimating the prospective frame extents and setting the window's _NET_FRAME_EXTENTS property accordingly. The Client MUST handle the resulting _NET_FRAME_EXTENTS PropertyNotify event. So that the Window Manager has a good basis for estimation, the Client MUST set any window properties it intends to set before sending this message. The Client MUST be able to cope with imperfect estimates."

The code [2] does:
[2] http://git.xfce.org/xfce/xfwm4/tree/src/events.c#n2004

When the root window receives _NET_REQUEST_FRAME_EXTENTS message, it sends a client message _NET_FRAME_EXTENTS with the default decorations size.

AFAICT, xfwm4 code matches the standard.
Comment 3 Olivier Fourdan editbugs 2015-03-09 10:26:00 CET
OK, I know what happens, since the window is not yet mapped, it is unknown to the WM which fails determine the root window and ignore the request.

I shall post a fix later.
Comment 4 Filipp Andjelo 2015-03-09 11:20:01 CET
Thank you very much Olivier!

If you need a short demo code to test, I can attach it here.
Comment 5 Olivier Fourdan editbugs 2015-03-09 12:02:58 CET
No thanks, it's fine, I can reproduce with glfw tests included on the source package.
Comment 6 Olivier Fourdan editbugs 2015-03-10 22:46:45 CET
A fix for this has been pushed in both master and xfce-4.12 branches.
Comment 7 Filipp Andjelo 2015-03-10 23:45:04 CET
Thank you very much Olivier for the fast help! I've just tested your fix and it works perfectly. Hope to see official patch release soon...
Comment 8 Andrew Kelley 2015-03-11 03:00:55 CET
How long until this patch ends up in ppa:xubuntu-dev/xfce-4.12 ?
Comment 9 Olivier Fourdan editbugs 2015-03-15 21:04:21 CET
*** Bug 11705 has been marked as a duplicate of this bug. ***

Bug #11664

Reported by:
Filipp Andjelo
Reported on: 2015-03-08
Last modified on: 2015-03-15
Duplicates (1):
  • 11705 Can not output a window using GLEW library on XFCE 4.12

People

Assignee:
Olivier Fourdan
CC List:
2 users

Version

Version:
4.11.3

Attachments

Additional information