public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* X: wglMakeCurrent error: 0006 on XUnmapWindow->XMapWindow
       [not found] <396829209.160817565.1497964511987.JavaMail.zimbra@wildblue.net>
@ 2017-06-20 13:24 ` Mick Pearson
  2017-06-23 14:22   ` Jon Turney
  0 siblings, 1 reply; 2+ messages in thread
From: Mick Pearson @ 2017-06-20 13:24 UTC (permalink / raw)
  To: cygwin

I was asked by the freeglut mailing list to alert the X/Cygwin
team to problems with the WGL context handles becoming invalid
if a window is hidden and then the error in the subject is out
putted when the window is revealed again.

There are also issues with iconification, where the windows are
in need of repainting when restored. But when unmapped they lose
their WGL context, meaning that OpenGL textures are probably lost
and the context is inoperable, which is a whole other class of 
problems.

The freeglut developer Chris Marshal confirmed this experience.
There is a resizer.exe demo in the freeglut development package
that demonstrates both problems.

In GLUT the problem presents itself when doing glutHideWindow and
then glutShowWindow. Which is not the same as XIconfiyWindow.

I hope this is a temporary development and not the state of X on
Cygwin. I found Xming to supplement the X server. I spent a couple
afternoons attempting to determine the root of the problem. I 
thought perhaps the backing-store fields needed to be set, but it
became clear that most X servers are simply very lenient and most
clients expect them to be, and that there's most likely oversights
in Cygwin/X in the direct rendering mode with WGL.

P.S. I have not subscribed to the Cygwin mailing list. You know if
I receive a CC, but I'm just throwing this out. It may well not be
the first report. Thank you :)

-- 
As with mail, anyone who wishes may send email from your email address. In the case you receive obscene or unusual email from an address with which you are familiar. It could be someone is impersonating that email address. Always return a copy of the email to the sender for review and response. 


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: X: wglMakeCurrent error: 0006 on XUnmapWindow->XMapWindow
  2017-06-20 13:24 ` X: wglMakeCurrent error: 0006 on XUnmapWindow->XMapWindow Mick Pearson
@ 2017-06-23 14:22   ` Jon Turney
  0 siblings, 0 replies; 2+ messages in thread
From: Jon Turney @ 2017-06-23 14:22 UTC (permalink / raw)
  To: The Cygwin Mailing List; +Cc: Mick Pearson

On 20/06/2017 14:24, Mick Pearson wrote:
> I was asked by the freeglut mailing list to alert the X/Cygwin
> team to problems with the WGL context handles becoming invalid

"team"... :hollow laughter:

Thanks for reporting this issue.

A link to the relevant post in the freeglut list archives, e.g. [1] 
would have been helpful.

[1] https://sourceforge.net/p/freeglut/mailman/message/35903099/

> if a window is hidden and then the error in the subject is out
> putted when the window is revealed again.

I couldn't quite reproduce this.

Using the Resizer demo,I get this error if I do 'c', then 'h'.   In this 
case the error is being emitted because drawing is taking place to the 
hidden child window.

I'm not sure if those errors could just be squelched, or something more 
complex is needed to solve that problem.

Perhaps you could give more detailed reproduction steps?

> There are also issues with iconification, where the windows are
> in need of repainting when restored. But when unmapped they lose

Yes, there are some issues with how the GL content is drawn (basically 
it's placed on top of the X windows, rather than being composed into 
them), which gives rise the contents not being repainted when restored, 
as briefly noted in [2].

(Incidentally, this also explains how to configure things to use 
indirect rendering, which seemed to be giving some difficulty in the 
linked thread)

> their WGL context, meaning that OpenGL textures are probably lost
> and the context is inoperable, which is a whole other class of
> problems.
Hmmm, yes.  The native windows are created/destroyed when the X windows 
are mapped/unmapped, for reasons lost in the mists of time.

Can you give an example of this class of problem?

I'd expect this problem to also exist with indirect WGL rendering.

> I hope this is a temporary development and not the state of X on
> Cygwin. I found Xming to supplement the X server. I spent a couple
> afternoons attempting to determine the root of the problem. I
> thought perhaps the backing-store fields needed to be set, but it
> became clear that most X servers are simply very lenient and most
> clients expect them to be, and that there's most likely oversights
> in Cygwin/X in the direct rendering mode with WGL.

(Quite possibly, when using Xming, it's operating in software rendering 
or indirect mode, which might explain why you don't see these problems then)

[2] https://x.cygwin.com/docs/ug/using-glx.html

-- 
Jon Turney
Volunteer Cygwin/X X Server maintainer

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-06-23 14:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <396829209.160817565.1497964511987.JavaMail.zimbra@wildblue.net>
2017-06-20 13:24 ` X: wglMakeCurrent error: 0006 on XUnmapWindow->XMapWindow Mick Pearson
2017-06-23 14:22   ` Jon Turney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).